Changeset 63 for trunk/Modules
- Timestamp:
- Aug 3, 2021, 11:20:41 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 nbproject2 Config.php3 1 .settings 4 2 .project 5 3 .buildpath 4 .htaccess
-
- Property svn:ignore
-
trunk/Modules/Club/Club.php
r55 r63 1 1 <?php 2 2 3 class ModuleClub extends AppModule3 class ModuleClub extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 17 function Start(): void 18 18 { 19 $this->System->RegisterPage( 'tancirny', 'PageDanceClub');20 } 19 $this->System->RegisterPage(['tancirny'], 'PageDanceClub'); 20 } 21 21 } 22 22 23 23 class PageClub extends Page 24 { 24 { 25 25 function __construct($System) 26 26 { 27 27 parent::__construct($System); 28 $this->FullTitle = 'Tančírny'; 29 $this->ShortTitle = 'Tančírny'; 28 $this->Title = 'Tančírny'; 30 29 } 31 32 function Show() 30 31 function Show(): string 33 32 { 34 35 33 return 'Dance clubs'; 36 34 } -
trunk/Modules/Dance/Dance.php
r55 r63 1 1 <?php 2 2 3 class ModuleDance extends AppModule3 class ModuleDance extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 18 { 19 $this->System->RegisterPage( 'tance', 'PageDanceList');20 $this->System->RegisterPage( 'tanec', 'PageDance');21 $this->System->RegisterPage( 'figura', 'PageDanceFigure');22 $this->System->RegisterPage( 'figury', 'PageDanceFigureList');23 $this->System->RegisterMenuItem('/tance', 'Tance');24 $this->System->RegisterMenuItem('/figury', 'Figury');25 } 17 function Start(): void 18 { 19 $this->System->RegisterPage(['tance'], 'PageDanceList'); 20 $this->System->RegisterPage(['tanec'], 'PageDance'); 21 $this->System->RegisterPage(['figura'], 'PageDanceFigure'); 22 $this->System->RegisterPage(['figury'], 'PageDanceFigureList'); 23 Core::Cast($this->System)->RegisterMenuItem('/tance', 'Tance'); 24 Core::Cast($this->System)->RegisterMenuItem('/figury', 'Figury'); 25 } 26 26 } 27 27 … … 31 31 { 32 32 parent::__construct($System); 33 $this->FullTitle = 'Tanec'; 34 $this->ShortTitle = 'Tanec'; 35 } 36 37 function Show() 38 { 39 $this->Title = 'Tanec - Tance - '.$this->Title; 33 $this->Title = 'Tanec'; 34 } 35 36 function Show(): string 37 { 40 38 $Output = ''; 41 39 if (count($this->System->PathItems) > 1) … … 101 99 $Output .= '</td>'; 102 100 }*/ 103 101 104 102 return $Output; 105 103 } … … 111 109 { 112 110 parent::__construct($System); 113 $this->FullTitle = 'Tance'; 114 $this->ShortTitle = 'Tance'; 115 } 116 117 function Show() 118 { 119 $this->Title = 'Tance - '.$this->Title; 111 $this->Title = 'Tance'; 112 } 113 114 function Show(): string 115 { 120 116 $Output = '<div class="title">Tance</div>'; 121 117 $Output .= '<table class="WideTable">'; … … 141 137 { 142 138 parent::__construct($System); 143 $this->FullTitle = 'Taneční figura'; 144 $this->ShortTitle = 'Figura'; 145 } 146 147 function Show() 148 { 149 $this->Title = 'Taneční figura - Tance - '.$this->Title; 139 $this->Title = 'Figura'; 140 $this->Description = 'Taneční figura'; 141 } 142 143 function Show(): string 144 { 150 145 $Output = ''; 151 146 if (count($this->System->PathItems) > 1) … … 196 191 $Output .= '</td>'; 197 192 }*/ 198 193 199 194 return $Output; 200 195 } … … 206 201 { 207 202 parent::__construct($System); 208 $this->FullTitle = 'Tance'; 209 $this->ShortTitle = 'Tance'; 210 } 211 212 function Show() 213 { 214 $this->Title = 'Tance - '.$this->Title; 203 $this->Title = 'Figury'; 204 $this->Description = 'Taneční figury'; 205 } 206 207 function Show(): string 208 { 215 209 $Output = '<div class="title">Taneční figury</div>'; 216 210 $Output .= '<table class="WideTable">'; -
trunk/Modules/Event/Event.php
r61 r63 3 3 include_once(dirname(__FILE__).'/Import/JoeClub.php'); 4 4 5 function GetDefaultEventFilter( $Table = '')5 function GetDefaultEventFilter(string $Table = ''): string 6 6 { 7 7 global $Config; … … 9 9 if ($Table != '') $Table = $Table.'.'; 10 10 11 return '('.$Table.'Hidden=0) AND ('.$Table.'TimeFrom > "'.TimeToMysqlDateTime(time() - $Config['EventInterval']).'")';11 return '('.$Table.'Hidden=0) AND ('.$Table.'TimeFrom > "'.TimeToMysqlDateTime(time() - (int)$Config['EventInterval']).'")'; 12 12 } 13 13 14 function ReduceSpaces( $Content)14 function ReduceSpaces(string $Content): string 15 15 { 16 16 while (strpos($Content, ' ') !== false) $Content = str_replace(' ', ' ', $Content); … … 18 18 } 19 19 20 function RemoveLines( $Content)20 function RemoveLines(string $Content): string 21 21 { 22 22 while (strpos($Content, "\n") !== false) $Content = str_replace("\n", ' ', $Content); … … 24 24 } 25 25 26 function RemoveTabs( $Content)26 function RemoveTabs(string $Content): string 27 27 { 28 28 while (strpos($Content, "\t") !== false) $Content = str_replace("\t", '', $Content); … … 34 34 public $Database; 35 35 36 function Parse( $Id = null)36 function Parse(int $Id = null): string 37 37 { 38 38 $Output = ''; … … 73 73 } 74 74 75 function Import() 75 function Import(): string 76 76 { 77 77 $this->AddedCount = 0; … … 99 99 var $Price = 0; 100 100 101 function AddIfNotExist( $TimeInterval = 0, $CompareTime = true, $CompareRemoteId = false)101 function AddIfNotExist(int $TimeInterval = 0, bool $CompareTime = true, bool $CompareRemoteId = false): int 102 102 { 103 103 $Where = '(`Description` = "'.$this->Database->real_escape_string($this->Description).'") AND '. -
trunk/Modules/Event/EventPage.php
r62 r63 1 1 <?php 2 2 3 class ModuleEvent extends AppModule3 class ModuleEvent extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 18 { 19 $this->System->RegisterPage( 'udalosti', 'PageEventList');20 $this->System->RegisterPage( array('udalosti', 'udalost'), 'PageEventItem');21 $this->System->RegisterPage( array('udalosti', 'aktualizace'), 'PageEventUpdate');22 $this->System->RegisterPage( array('udalosti', 'rss'), 'PageEventRss');23 $this->System->RegisterMenuItem('/udalosti', 'Události');17 function Start(): void 18 { 19 $this->System->RegisterPage(['udalosti'], 'PageEventList'); 20 $this->System->RegisterPage(['udalosti', 'udalost'], 'PageEventItem'); 21 $this->System->RegisterPage(['udalosti', 'aktualizace'], 'PageEventUpdate'); 22 $this->System->RegisterPage(['udalosti', 'rss'], 'PageEventRss'); 23 Core::Cast($this->System)->RegisterMenuItem('/udalosti', 'Události'); 24 24 } 25 25 } … … 30 30 { 31 31 parent::__construct($System); 32 $this-> FullTitle = 'Taneční události';33 $this-> ShortTitle = 'Události';34 } 35 36 function Show() 32 $this->Title = 'Události'; 33 $this->Description = 'Taneční události'; 34 } 35 36 function Show(): string 37 37 { 38 38 $Filter = new Filter(); … … 47 47 48 48 $Output = ''; 49 $this->Title = 'Události - '.$this->Title;50 49 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 51 50 $this->RawPage = true; … … 111 110 { 112 111 parent::__construct($System); 113 $this-> FullTitle = 'Aktualizace tanečníchudálostí';114 $this-> ShortTitle = 'Aktualizaceudálostí';115 } 116 117 function Show() 112 $this->Title = 'Aktualizace událostí'; 113 $this->Description = 'Aktualizace tanečních událostí'; 114 } 115 116 function Show(): string 118 117 { 119 118 $EventSources = new EventSources(); … … 130 129 { 131 130 parent::__construct($System); 132 $this->FullTitle = 'Taneční událost'; 133 $this->ShortTitle = 'Událost'; 134 } 135 136 function Show() 137 { 138 $this->Title = 'Událost - Události - '.$this->Title; 131 $this->Title = 'Událost'; 132 $this->Description = 'Taneční událost'; 133 } 134 135 function Show(): string 136 { 139 137 $Output = ''; 140 138 if (count($this->System->PathItems) > 2) … … 142 140 $id = $this->System->PathItems[2] * 1; 143 141 } else return 'Položka nenalezena'; 144 if ( $this->System->IsAdmin())142 if (Core::Cast($this->System)->IsAdmin()) 145 143 { 146 144 if (array_key_exists('hide', $_GET)) $this->Database->update('Event', 'Id='.$id, array('Hidden' => 1)); … … 154 152 { 155 153 $Event = $DbResult->fetch_assoc(); 156 if (($Event['Filter'] == '0') and ! $this->System->IsAdmin())154 if (($Event['Filter'] == '0') and !Core::Cast($this->System)->IsAdmin()) 157 155 return 'Položka nenalezena'; 158 156 if ($Event['Link'] != '') $Link = '<a href="'.$Event['Link'].'">Odkaz</a>'; … … 168 166 '<tr><th>Zdroj importu</th><td><a href="'.$Event['SourceURL'].'">'.$Event['SourceName'].'</a></td></tr>'; 169 167 $Output .= '</table>'; 170 if ( $this->System->IsAdmin()) {168 if (Core::Cast($this->System)->IsAdmin()) { 171 169 if ($Event['Hidden'] == '1') 172 170 $Output .= '<div>Skrytá položka <a href="?unhide">Zviditelnit</a></div>'; … … 183 181 { 184 182 parent::__construct($System); 185 $this-> FullTitle = 'RSS kanáltanečních událostí';186 $this-> ShortTitle = 'RSS tanečníudálostí';187 } 188 189 function Show() 183 $this->Title = 'RSS tanečních událostí'; 184 $this->Description = 'RSS kanál tanečních událostí'; 185 } 186 187 function Show(): string 190 188 { 191 189 global $Config; -
trunk/Modules/Event/Import/JoeClub.php
r55 r63 3 3 class EventSourceJoeClub extends EventSource 4 4 { 5 function ImportInternal() 5 function ImportInternal(): string 6 6 { 7 7 $Output = ''; -
trunk/Modules/Meet/Import/Amblar.php
r57 r63 26 26 class MeetSourceAmblar extends MeetSource 27 27 { 28 function Import() 28 function Import(): string 29 29 { 30 30 $Output = parent::Import(); … … 79 79 } 80 80 81 function ImportItem( &$MeetItem)81 function ImportItem(MeetItem &$MeetItem): string 82 82 { 83 83 global $HeightTags, $AgeTags, $LevelTags; … … 92 92 { 93 93 $Output .= 'Main block not isolated.</br>'; 94 return ;94 return $Output; 95 95 } 96 96 -
trunk/Modules/Meet/Import/AstraPraha.php
r57 r63 3 3 class MeetSourceAstraPraha extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Csts.php
r57 r63 3 3 class MeetSourceCsts extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Ella.php
r57 r63 3 3 class MeetSourceElla extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Eso.php
r57 r63 3 3 class MeetSourceEso extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Facebook.php
r57 r63 3 3 class MeetSourceFacebook extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 return ;7 return ''; 8 8 $Output = parent::Import(); 9 9 $Content = file_get_contents($this->URL); -
trunk/Modules/Meet/Import/MajkluvSvet.php
r57 r63 3 3 class MeetSourceMajkluvSvet extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/SalsaDance.php
r57 r63 3 3 class MeetSourceSalsaDance extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Seznamka.php
r58 r63 3 3 class MeetSourceSeznamka extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/TanecniSkola.php
r60 r63 3 3 class MeetSourceTanecniSkola extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Import/Vavruska.php
r57 r63 3 3 class MeetSourceVavruska extends MeetSource 4 4 { 5 function Import() 5 function Import(): string 6 6 { 7 7 $Output = parent::Import(); -
trunk/Modules/Meet/Meet.php
r61 r63 20 20 } 21 21 22 function GetTextBetween( &$Text, $Start, $End)22 function GetTextBetween(string &$Text, string $Start, string $End): string 23 23 { 24 24 $Result = ''; … … 32 32 } 33 33 34 function HumanDateTimeToTime( $DateTime)34 function HumanDateTimeToTime(string $DateTime): ?int 35 35 { 36 36 if ($DateTime == '') return NULL; … … 47 47 } 48 48 49 function HumanDateToTime( $Date)49 function HumanDateToTime(string $Date): ?int 50 50 { 51 51 if ($Date == '') return NULL; … … 53 53 } 54 54 55 function DecodeHtmlEnt( $str)55 function DecodeHtmlEnt(string $str): string 56 56 { 57 57 $prefix = '&#'; … … 90 90 } 91 91 92 function RemoveHtmlComments( $Content)92 function RemoveHtmlComments(string $Content): string 93 93 { 94 94 $Result = ''; … … 103 103 } 104 104 105 function is_alpha( $Char)105 function is_alpha(string $Char): bool 106 106 { 107 107 return (($Char >= 'a') and ($Char <= 'z')) or (($Char >= 'A') and ($Char <= 'Z')); 108 108 } 109 109 110 function is_white_space( $Char)110 function is_white_space(string $Char): bool 111 111 { 112 112 return ($Char == ' ') or ($Char == "\t"); 113 113 } 114 114 115 function GetDefaultMeetFilter( $Table = '')115 function GetDefaultMeetFilter(string $Table = ''): string 116 116 { 117 117 global $Config; … … 119 119 if ($Table != '') $Table = $Table.'.'; 120 120 121 return '('.$Table.'Hidden=0) AND ('.$Table.'Time > "'.TimeToMysqlDateTime(time() - $Config['MeetInterval']).'")';122 } 123 124 function GetNumberBeforeText( $Text, $Needle)121 return '('.$Table.'Hidden=0) AND ('.$Table.'Time > "'.TimeToMysqlDateTime(time() - (int)$Config['MeetInterval']).'")'; 122 } 123 124 function GetNumberBeforeText(string $Text, string $Needle): string 125 125 { 126 126 $Result = ''; … … 148 148 } 149 149 150 function GetNumberAfterText( $Text, $Needle)150 function GetNumberAfterText(string $Text, string $Needle): string 151 151 { 152 152 $Result = ''; … … 175 175 } 176 176 177 function GetAgeFromText( $Text)177 function GetAgeFromText(string $Text): string 178 178 { 179 179 $Text = strtolower($Text); … … 212 212 } 213 213 214 function GetHeightFromText( $Text)214 function GetHeightFromText(string $Text): string 215 215 { 216 216 $Text = strtolower($Text); … … 228 228 } 229 229 230 function GetWeightFromText( $Text)230 function GetWeightFromText(string $Text): string 231 231 { 232 232 $Text = strtolower($Text); … … 238 238 } 239 239 240 function GetAgeHeightWeightFromText( $Text)240 function GetAgeHeightWeightFromText(string $Text): array 241 241 { 242 242 $Result = array('', '', ''); … … 261 261 } 262 262 263 function GetEmailFromText( $Text)263 function GetEmailFromText(string $Text): string 264 264 { 265 265 $Result = ''; … … 302 302 ); 303 303 304 function GetLocationFromText( $Text)304 function GetLocationFromText(string $Text): string 305 305 { 306 306 global $Locations; … … 315 315 } 316 316 317 function GetGenderFromName( $Text)317 function GetGenderFromName(string $Text): string 318 318 { 319 319 $Gender = Gender::Male; … … 334 334 public $Database; 335 335 336 function Parse( $Id = null)336 function Parse(?int $Id = null): string 337 337 { 338 338 $Output = ''; … … 392 392 } 393 393 394 function Import() 394 function Import(): string 395 395 { 396 396 return ''; 397 397 } 398 398 399 function DoImport() 399 function DoImport(): string 400 400 { 401 401 $this->MeetItems = array(); … … 406 406 foreach ($this->MeetItems as $MeetItem) 407 407 { 408 if ($MeetItem->IsSpam()) continue; 408 409 $this->AddedCount += $MeetItem->AddIfNotExist($this->AddTimeInterval, $this->AddCompareTime, $this->AddCompareRemoteId); 409 410 } … … 434 435 var $RemoteId = ''; 435 436 436 function AddIfNotExist( $TimeInterval = 0, $CompareTime = true, $CompareRemoteId = false)437 function AddIfNotExist(int $TimeInterval = 0, bool $CompareTime = true, bool $CompareRemoteId = false): int 437 438 { 438 439 $Where = '(`Message` = "'.$this->Database->real_escape_string($this->Message).'") AND '. … … 473 474 return $Result; 474 475 } 475 } 476 477 function IsSpam(): bool 478 { 479 $Keywords = array('půjčk', 'úvěr'); 480 foreach ($Keywords as $Keyword) 481 { 482 if (strpos($this->Message, $Keyword) !== false) 483 { 484 return false; 485 } 486 } 487 return true; 488 } 489 } -
trunk/Modules/Meet/MeetPage.php
r62 r63 1 1 <?php 2 2 3 class ModuleMeet extends AppModule3 class ModuleMeet extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 18 { 19 $this->System->RegisterPage( 'seznamka', 'PageMeetList');20 $this->System->RegisterPage( array('seznamka', 'inzerat'), 'PageMeetItem');21 $this->System->RegisterPage( array('seznamka', 'aktualizace'), 'PageMeetUpdate');22 $this->System->RegisterPage( array('seznamka', 'rss'), 'PageMeetRss');23 $this->System->RegisterMenuItem('/seznamka', 'Seznamka');17 function Start(): void 18 { 19 $this->System->RegisterPage(['seznamka'], 'PageMeetList'); 20 $this->System->RegisterPage(['seznamka', 'inzerat'], 'PageMeetItem'); 21 $this->System->RegisterPage(['seznamka', 'aktualizace'], 'PageMeetUpdate'); 22 $this->System->RegisterPage(['seznamka', 'rss'], 'PageMeetRss'); 23 Core::Cast($this->System)->RegisterMenuItem('/seznamka', 'Seznamka'); 24 24 } 25 25 } … … 30 30 { 31 31 parent::__construct($System); 32 $this-> FullTitle = 'Taneční seznamka';33 $this-> ShortTitle = 'Seznamka';34 } 35 36 function Show() 32 $this->Title = 'Seznamka'; 33 $this->Description = 'Taneční seznamka'; 34 } 35 36 function Show(): string 37 37 { 38 38 global $Config; … … 52 52 53 53 $Output = ''; 54 $this->Title = 'Seznamka - '.$this->Title;55 54 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 56 55 $this->RawPage = true; … … 121 120 { 122 121 parent::__construct($System); 123 $this-> FullTitle = 'Aktualizace tanečníseznamky';124 $this-> ShortTitle = 'Aktualizaceseznamky';125 } 126 127 function Show() 122 $this->Title = 'Aktualizace seznamky'; 123 $this->Description = 'Aktualizace taneční seznamky'; 124 } 125 126 function Show(): string 128 127 { 129 128 $MeetSources = new MeetSources(); … … 140 139 { 141 140 parent::__construct($System); 142 $this->FullTitle = 'Inzerát taneční seznamky'; 143 $this->ShortTitle = 'Inzerát seznamky'; 144 } 145 146 function Show() 147 { 148 $this->Title = 'Inzerát - Seznamka - '.$this->Title; 141 $this->Title = 'Inzerát'; 142 $this->Description = 'Inzerát taneční seznamky'; 143 } 144 145 function Show(): string 146 { 149 147 $Output = ''; 150 148 if (count($this->System->PathItems) > 2) … … 152 150 $id = $this->System->PathItems[2] * 1; 153 151 } else return 'Položka nenalezena'; 154 if ( $this->System->IsAdmin())152 if (Core::Cast($this->System)->IsAdmin()) 155 153 { 156 154 if (array_key_exists('hide', $_GET)) $this->Database->update('MeetItem', 'Id='.$id, array('Hidden' => 1)); … … 165 163 { 166 164 $MeetItem = $DbResult->fetch_assoc(); 167 if (($MeetItem['Filter'] == '0') and ! $this->System->IsAdmin())165 if (($MeetItem['Filter'] == '0') and !Core::Cast($this->System)->IsAdmin()) 168 166 return 'Položka nenalezena'; 169 167 if ($MeetItem['Link'] != '') $Link = '<a href="'.$MeetItem['Link'].'">Odkaz</a>'; … … 183 181 '<tr><th>Zdroj importu</th><td><a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a></td></tr>'; 184 182 $Output .= '</table>'; 185 if ( $this->System->IsAdmin()) {183 if (Core::Cast($this->System)->IsAdmin()) { 186 184 if ($MeetItem['Hidden'] == '1') 187 185 $Output .= '<div>Skrytá položka <a href="?unhide">Zviditelnit</a></div>'; … … 198 196 { 199 197 parent::__construct($System); 200 $this-> FullTitle = 'RSS kanál tanečníseznamky';201 $this-> ShortTitle = 'RSS inzerátyseznamky';202 } 203 204 function Show() 198 $this->Title = 'RSS inzeráty seznamky'; 199 $this->Description = 'RSS kanál taneční seznamky'; 200 } 201 202 function Show(): string 205 203 { 206 204 global $Config; -
trunk/Modules/Movie/Movie.php
r56 r63 1 1 <?php 2 2 3 class ModuleMovie extends AppModule3 class ModuleMovie extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 17 function Start(): void 18 18 { 19 $this->System->RegisterPage( 'filmy', 'PageMovieList');20 $this->System->RegisterMenuItem('/filmy', 'Filmy');19 $this->System->RegisterPage(['filmy'], 'PageMovieList'); 20 Core::Cast($this->System)->RegisterMenuItem('/filmy', 'Filmy'); 21 21 } 22 22 } … … 27 27 { 28 28 parent::__construct($System); 29 $this-> FullTitle = 'Taneční filmy';30 $this-> ShortTitle = 'Filmy';29 $this->Title = 'Filmy'; 30 $this->Description = 'Taneční filmy'; 31 31 } 32 32 33 function Show() 33 function Show(): string 34 34 { 35 35 $Output = ''; 36 $this->Title = 'Filmy - '.$this->Title;37 36 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 38 37 $this->RawPage = true; -
trunk/Modules/RSS/RSS.php
r56 r63 1 1 <?php 2 2 3 class ModuleRSS extends AppModule3 class ModuleRSS extends Module 4 4 { 5 5 var $RSSChannels; … … 17 17 } 18 18 19 function Start() 19 function Start(): void 20 20 { 21 $this->System->RegisterPage( 'rss', 'PageRSS');22 $this->System->RegisterPageHeader('RSS', array($this, 'ShowRSSHeader'));21 $this->System->RegisterPage(array('rss'), 'PageRSS'); 22 Core::Cast($this->System)->RegisterPageHeader('RSS', array($this, 'ShowRSSHeader')); 23 23 } 24 24 25 function RegisterRSS( $Channel, $Pos = NULL, $Callback = NULL)25 function RegisterRSS(array $Channel, ?int $Pos = NULL, $Callback = NULL): void 26 26 { 27 27 $this->RSSChannels[$Channel['Channel']] = $Channel; … … 33 33 } 34 34 35 function UnregisterRSS( $ChannelName)35 function UnregisterRSS(string $ChannelName): void 36 36 { 37 37 unset($this->RSSChannels[$ChannelName]); … … 39 39 } 40 40 41 function ShowRSSHeader() 41 function ShowRSSHeader(): string 42 42 { 43 43 $Output = ''; … … 54 54 class PageRSS extends Page 55 55 { 56 function Show() 56 function Show(): string 57 57 { 58 58 $this->RawPage = true; -
trunk/Modules/School/School.php
r55 r63 1 1 <?php 2 2 3 class ModuleSchool extends AppModule3 class ModuleSchool extends Module 4 4 { 5 5 function __construct($System) … … 15 15 } 16 16 17 function Start() 17 function Start(): void 18 18 { 19 $this->System->RegisterPage( 'skoly', 'PageSchoolList');20 $this->System->RegisterMenuItem('/skoly', 'Školy');21 } 19 $this->System->RegisterPage(['skoly'], 'PageSchoolList'); 20 Core::Cast($this->System)->RegisterMenuItem('/skoly', 'Školy'); 21 } 22 22 } 23 23 … … 27 27 { 28 28 parent::__construct($System); 29 $this-> FullTitle = 'Taneční školy';30 $this-> ShortTitle = 'Školy';29 $this->Title = 'Školy'; 30 $this->Description = 'Taneční školy'; 31 31 } 32 32 33 function Show() 33 function Show(): string 34 34 { 35 $this->Title = 'Taneční školy - '.$this->Title;36 35 $Output = '<div class="title">Taneční školy</div>'; 37 36 $Output .= '<table class="WideTable">';
Note:
See TracChangeset
for help on using the changeset viewer.