Changeset 893 for trunk/Application
- Timestamp:
- Mar 6, 2023, 1:48:45 AM (22 months ago)
- Location:
- trunk/Application
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Core.php
r888 r893 12 12 public array $PageHeaders; 13 13 public string $BaseURL; 14 public array $RSSChannels; 15 public BaseView $BaseView; 16 public array $LinkLocaleExceptions; 14 17 15 18 function __construct() -
trunk/Application/UpdateTrace.php
r892 r893 2975 2975 function UpdateTo892($Manager) 2976 2976 { 2977 $Manager->Execute('ALTER TABLE `User` CHANGE `Info` `Info` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '';');2977 $Manager->Execute('ALTER TABLE `User` CHANGE `Info` `Info` TEXT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT "";'); 2978 2978 } 2979 2979 -
trunk/Application/Version.php
r892 r893 7 7 8 8 $Version = '1.0'; 9 $Revision = 89 2; // Subversion revision9 $Revision = 893; // Subversion revision 10 10 $DatabaseRevision = 891; // Database structure revision 11 $ReleaseDate = strtotime('2023-03-0 3');11 $ReleaseDate = strtotime('2023-03-06'); -
trunk/Application/View.php
r888 r893 3 3 class BaseView extends View 4 4 { 5 var$Title;5 public string $Title; 6 6 7 7 function ShowLocaleSelector() … … 9 9 //$Output .= ' <form action="?setlocale" method="get">'; 10 10 $Output = ' <select onchange="window.location=this.value">'; 11 foreach ( $this->System->LocaleManager->Available as $Locale)11 foreach (Core::Cast($this->System)->LocaleManager->Available as $Locale) 12 12 { 13 $Remaining = substr($_SERVER["REQUEST_URI"], strlen( $this->System->BaseURL));14 if (substr($Remaining, 1, strlen($Locale['Code'].'/')) == $this->System->LocaleManager->LangCode.'/')13 $Remaining = substr($_SERVER["REQUEST_URI"], strlen(Core::Cast($this->System)->BaseURL)); 14 if (substr($Remaining, 1, strlen($Locale['Code'].'/')) == Core::Cast($this->System)->LocaleManager->LangCode.'/') 15 15 $Remaining = substr($Remaining, strlen('/'.$Locale['Code'])); 16 if ($Locale['Code'] == $this->System->LocaleManager->CurrentLocale->Texts->Code) $Selected = ' selected="selected"';16 if ($Locale['Code'] == Core::Cast($this->System)->LocaleManager->CurrentLocale->Texts->Code) $Selected = ' selected="selected"'; 17 17 else $Selected = ''; 18 $Remaining = Core::Cast($this->System)->TranslateReverseURL($Remaining, $this->System->LocaleManager->LangCode);18 $Remaining = Core::Cast($this->System)->TranslateReverseURL($Remaining, Core::Cast($this->System)->LocaleManager->LangCode); 19 19 20 20 $URL = Core::Cast($this->System)->LinkLocale($Remaining, $Locale['Code']); … … 28 28 function ShowTopBar() 29 29 { 30 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 30 31 $Output = '<div class="Menu">'; 31 if (isset($ this->System->User))32 if (isset($User)) 32 33 { 33 if (!$ this->System->User->Licence(LICENCE_USER))34 $Output .= '<div class="advert">'. $this->System->Config['Web']['Advertisement'].'</div>';34 if (!$User->Licence(LICENCE_USER)) 35 $Output .= '<div class="advert">'.Core::Cast($this->System)->Config['Web']['Advertisement'].'</div>'; 35 36 } 36 37 $Output .= '<span class="MenuItem"></span><span class="MenuItem2">'; … … 38 39 // Show bars items 39 40 $Bar = ''; 40 foreach ( $this->System->Bars['Top'] as $BarItem)41 foreach (Core::Cast($this->System)->Bars['Top'] as $BarItem) 41 42 $Bar .= call_user_func($BarItem); 42 43 if (trim($Bar) != '') $Output .= $Bar; … … 51 52 function ShowMainMenu() 52 53 { 54 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 53 55 $Output = '<strong>'.T('Menu').':</strong>'. 54 56 '<div class="verticalmenu"><ul>'; 55 foreach ( $this->System->Menu as $MenuItem)57 foreach (Core::Cast($this->System)->Menu as $MenuItem) 56 58 { 57 if (!isset($ this->System->User) or $this->System->User->Licence($MenuItem['Permission']))59 if (!isset($User) or $User->Licence($MenuItem['Permission'])) 58 60 { 59 61 if (isset($MenuItem['Click'])) $OnClick = ' onclick="'.$MenuItem['Click'].'"'; … … 75 77 '<html>'. 76 78 '<head>'. 77 '<meta http-equiv="content-type" content="text/html; charset='. $this->System->Config['Web']['Charset'].'" />'.78 '<meta name="keywords" content="'. $this->System->Config['Web']['Keywords'].'" />'.79 '<meta name="description" content="'. $this->System->Config['Web']['Description'].'" />'.79 '<meta http-equiv="content-type" content="text/html; charset='.Core::Cast($this->System)->Config['Web']['Charset'].'" />'. 80 '<meta name="keywords" content="'.Core::Cast($this->System)->Config['Web']['Keywords'].'" />'. 81 '<meta name="description" content="'.Core::Cast($this->System)->Config['Web']['Description'].'" />'. 80 82 '<meta name="robots" content="all" />'. 81 83 '<meta name="viewport" content="width=device-width, initial-scale=1">'. … … 86 88 // Show page headers 87 89 $Bar = ''; 88 foreach ($this->System->PageHeaders as $Item) 90 foreach (Core::Cast($this->System)->PageHeaders as $Item) 91 { 89 92 $Output .= call_user_func($Item); 93 } 90 94 91 $Title = $this->System->Config['Web']['Title'];95 $Title = Core::Cast($this->System)->Config['Web']['Title']; 92 96 if ($this->Title != '') $Title = $this->Title.' - '.$Title; 93 97 $Output .= '<title>'.$Title.'</title>'. … … 101 105 // Show bars items 102 106 $Bar = ''; 103 foreach ( $this->System->Bars['Left'] as $BarItem)107 foreach (Core::Cast($this->System)->Bars['Left'] as $BarItem) 104 108 $Bar .= call_user_func($BarItem); 105 109 if (trim($Bar) != '') $Output .= $Bar; … … 120 124 // Show bars items 121 125 $Bar = ''; 122 foreach ( $this->System->Bars['Right'] as $BarItem)126 foreach (Core::Cast($this->System)->Bars['Right'] as $BarItem) 123 127 $Bar .= call_user_func($BarItem); 124 128 if (trim($Bar) != '') $Output .= $Bar; … … 129 133 ' <a href="https://app.zdechov.net/wowpreklad/browser/trunk">'.T('Source code').'</a> '. 130 134 '<a href="https://app.zdechov.net/wowpreklad/log/trunk?verbose=on">'.T('Changelog').'</a> '. 131 $this->System->Config['Web']['WebCounter'];135 Core::Cast($this->System)->Config['Web']['WebCounter']; 132 136 133 137 $Output .= '</td></tr>'; 134 if ( $this->System->Config['Web']['ShowRuntimeInfo'] == true)138 if (Core::Cast($this->System)->Config['Web']['ShowRuntimeInfo'] == true) 135 139 $Output .= '<tr><td colspan="3" style="text-align: center;">'.T('Generating duration').': '. 136 140 $ScriptGenerateDuration.' s / '.ini_get('max_execution_time').' s '.T('Used memory').': '. … … 146 150 { 147 151 $Output = $this->ShowHeader().$Content.$this->ShowFooter(); 148 if ( $this->System->Config['Web']['FormatOutput'])152 if (Core::Cast($this->System)->Config['Web']['FormatOutput']) 149 153 $Output = $this->FormatOutput($Output); 150 154 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.