- Timestamp:
- Sep 22, 2023, 11:55:38 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/BaseView.php
r929 r957 75 75 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->Encoding.'" />'. 76 76 '<script type="text/javascript" src="'.$this->System->Link('/style/').$this->Style.'/global.js"></script>'. 77 '<title>'.$Path.' - '. $this->System->Config['Web']['Title'].'</title>';77 '<title>'.$Path.' - '.Core::Cast($this->System)->Config['Web']['Title'].'</title>'; 78 78 79 79 // Show page headers 80 80 $Bar = ''; 81 foreach ( $this->System->PageHeaders as $Item)81 foreach (Core::Cast($this->System)->PageHeaders as $Item) 82 82 $Output .= call_user_func($Item); 83 83 … … 88 88 $Output .= '<div class="MainTitle"><span class="MenuItem"><strong>Navigace :: </strong> '.$Navigation.'</span><div class="MenuItem2">'; 89 89 $Bar = ''; 90 foreach ( $this->System->Bars['Top'] as $BarItem)90 foreach (Core::Cast($this->System)->Bars['Top'] as $BarItem) 91 91 $Bar .= call_user_func($BarItem); 92 92 if (trim($Bar) != '') $Output .= $Bar; … … 101 101 global $Revision, $ReleaseTime; 102 102 103 $Time = round(GetMicrotime() - $this->System->ScriptTimeStart, 2);103 $Time = round(GetMicrotime() - Core::Cast($this->System)->ScriptTimeStart, 2); 104 104 $Output = ''; 105 105 if ($this->BasicHTML == false) 106 106 { 107 107 $Output .= '<div id="Footer">'. 108 '<i>| Správa webu: '. $this->System->Config['Web']['Admin'].' | e-mail: '.$this->System->Config['Web']['AdminEmail'].' | '.108 '<i>| Správa webu: '.Core::Cast($this->System)->Config['Web']['Admin'].' | e-mail: '.Core::Cast($this->System)->Config['Web']['AdminEmail'].' | '. 109 109 ' Verze: '.$Revision.' ('.Core::Cast($this->System)->HumanDate($ReleaseTime).') |'; 110 110 if ($this->ShowRuntimeInfo == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time'). … … 118 118 function GetOutput(Page $Page): string 119 119 { 120 $Page->OnSystemMessage = array( $this->System->BaseView, 'SystemMessage');120 $Page->OnSystemMessage = array(Core::Cast($this->System)->BaseView, 'SystemMessage'); 121 121 122 122 $Output = $Page->Show(); -
trunk/Application/UpdateTrace.php
r953 r957 2237 2237 { 2238 2238 $Manager->Execute('ALTER TABLE `News` ADD `Intranet` INT NOT NULL DEFAULT "0" AFTER `Link`;'); 2239 } 2240 2241 function UpdateTo957(UpdateManager $Manager): void 2242 { 2243 $Manager->Execute('ALTER TABLE `Log` ADD `URL` VARCHAR(255) NOT NULL AFTER `IPAddress`;'); 2239 2244 } 2240 2245 … … 2351 2356 939 => array('Revision' => 948, 'Function' => 'UpdateTo948'), 2352 2357 948 => array('Revision' => 953, 'Function' => 'UpdateTo953'), 2358 953 => array('Revision' => 957, 'Function' => 'UpdateTo957'), 2353 2359 ); 2354 2360 } -
trunk/Application/Version.php
r956 r957 1 1 <?php 2 2 3 $Revision = 95 6; // Subversion revision4 $DatabaseRevision = 95 3; // SQL structure revision5 $ReleaseTime = strtotime('2023-09- 04');3 $Revision = 957; // Subversion revision 4 $DatabaseRevision = 957; // SQL structure revision 5 $ReleaseTime = strtotime('2023-09-22'); -
trunk/Common/Global.php
r953 r957 398 398 } 399 399 400 function Exec euteNoError(callable $Function): void400 function ExecuteNoError(callable $Function): void 401 401 { 402 402 try … … 404 404 $LastErrorReporting = error_reporting(); 405 405 error_reporting(0); 406 $ function();406 $Function(); 407 407 } 408 408 finally -
trunk/Install/deb/debian/conf/Config.php
r918 r957 33 33 $Config['Web']['ItemsPerPage'] = '50'; 34 34 $Config['Web']['VisiblePagingItems'] = '20'; 35 $Config['Web']['FormatHTML'] = '0';36 35 $Config['Web']['ShowSQLError'] = '0'; 37 36 $Config['Web']['ShowSQLQuery'] = false; -
trunk/Modules/Error/Error.php
r899 r957 22 22 function DoStart(): void 23 23 { 24 $this->ErrorHandler->ShowError = $this->System->Config['Web']['ShowPHPError'];24 $this->ErrorHandler->ShowError = Core::Cast($this->System)->Config['Web']['ShowPHPError']; 25 25 $this->ErrorHandler->OnError = array(array($this, 'DoOnError')); 26 26 $this->ErrorHandler->Start(); -
trunk/Modules/Log/Log.php
r949 r957 36 36 } 37 37 38 function GetRequestURI(): string 39 { 40 if (array_key_exists('REQUEST_URI', $_SERVER)) return $_SERVER['REQUEST_URI']; 41 else return $_SERVER['PHP_SELF']; 42 } 43 38 44 function NewRecord(string $Module, string $Operation, string $Value = ''): void 39 45 { … … 46 52 $this->Database->insert('Log', array('Time' => 'NOW()', 47 53 'User' => $UserId, 'Module' => $Module, 48 'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress ));54 'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $IPAddress, 'URL' => $this->GetRequestURI())); 49 55 } 50 56 -
trunk/Modules/News/NewsPage.php
r955 r957 24 24 { 25 25 $Category = $this->GetCategory(); 26 if (array_key_exists('id', $_GET) ) $Id = $_GET['id'] * 1;26 if (array_key_exists('id', $_GET) and is_integer($_GET['id'])) $Id = $_GET['id'] * 1; 27 27 else return $Output .= 'Položka nenalezena.'; 28 28 $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` '. … … 67 67 if ($User->CheckPermission('News', 'Insert', 'Group', $Category['Id'])) 68 68 { 69 $this->System->PageHeaders[] = array($this, 'GetPageHeader');69 Core::Cast($this->System)->PageHeaders[] = array($this, 'GetPageHeader'); 70 70 $Output = '<strong>Vložení nové aktuality:</strong><br />'; 71 71 // TODO: Static reference to dynamic category item … … 170 170 if ($Row['Intranet'] == 1) $IntranetChecked = ' checked="1"'; 171 171 else $IntranetChecked = 0; 172 $this->System->PageHeaders[] = array($this, 'GetPageHeader');172 Core::Cast($this->System)->PageHeaders[] = array($this, 'GetPageHeader'); 173 173 $Output .= '<strong>Editace aktuality v kategorii '.$Category['Caption'].':</strong><br />'; 174 174 $Output .= '<form action="?action=update" method="post">'. … … 296 296 { 297 297 $Category = array('Id' => 1); // Default category 298 if (array_key_exists('category', $_GET) ) $Category['Id'] = $_GET['category'] * 1;299 if (array_key_exists('category', $_POST) ) $Category['Id'] = $_POST['category'] * 1;298 if (array_key_exists('category', $_GET) and is_integer($_GET['category'])) $Category['Id'] = $_GET['category'] * 1; 299 if (array_key_exists('category', $_POST) and is_integer($_POST['category'])) $Category['Id'] = $_POST['category'] * 1; 300 300 //if (is_null($Category)) throw new Exception('Kategorie neurčena'); 301 301 else … … 311 311 { 312 312 $Output = ''; 313 if (array_key_exists('action', $_GET)) $Action = $_GET['action'];313 if (array_key_exists('action', $_GET)) $Action = $_GET['action']; 314 314 else $Action = ''; 315 315 if ($Action == 'view') $Output .= $this->ShowView(); … … 361 361 if (substr($Index, 0, 8) == 'category') $Select .= '-'.substr($Index, 8); 362 362 } 363 $Select = $this->System->Config['Web']['RootFolder'].'/aktuality/rss/?select='.substr($Select, 1);363 $Select = Core::Cast($this->System)->Config['Web']['RootFolder'].'/aktuality/rss/?select='.substr($Select, 1); 364 364 $Output = 'Výsledný RSS kanál: <a href="'.$Select.'">'.$Select.'</a>'; 365 365 } else … … 412 412 foreach ($Parts as $Part) 413 413 { 414 $Where .= 'OR (`Category`='.($Part * 1).')';414 if (is_integer($Part)) $Where .= 'OR (`Category`='.($Part * 1).')'; 415 415 } 416 416 $Where = substr($Where, 2); … … 474 474 $Items[] = array( 475 475 'Title' => $Categories[$Row['Category']].' - '.$Row['Title'], 476 'Link' => 'https://'. $this->System->Config['Web']['Host'].'/aktuality/?category='.$Row['Category'],476 'Link' => 'https://'.Core::Cast($this->System)->Config['Web']['Host'].'/aktuality/?category='.$Row['Category'], 477 477 'Description' => $Row['Content'].' ('.$Author.')'.$EnclosuresText, 478 478 'Time' => $Row['UnixTime'], … … 481 481 482 482 $RSS = new RSS(); 483 $RSS->Title = $this->System->Config['Web']['Title'].' - Aktuality';484 $RSS->Link = 'https://'. $this->System->Config['Web']['Host'].'/';485 $RSS->Description = 'Aktuality '. $this->System->Config['Web']['Description'];486 $RSS->WebmasterEmail = $this->System->Config['Web']['AdminEmail'];483 $RSS->Title = Core::Cast($this->System)->Config['Web']['Title'].' - Aktuality'; 484 $RSS->Link = 'https://'.Core::Cast($this->System)->Config['Web']['Host'].'/'; 485 $RSS->Description = 'Aktuality '.Core::Cast($this->System)->Config['Web']['Description']; 486 $RSS->WebmasterEmail = Core::Cast($this->System)->Config['Web']['AdminEmail']; 487 487 $RSS->Items = $Items; 488 488 return $RSS->Generate();
Note:
See TracChangeset
for help on using the changeset viewer.