Changeset 896 for trunk/Application
- Timestamp:
- Jan 14, 2021, 7:38:26 PM (4 years ago)
- Location:
- trunk/Application
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Core.php
r895 r896 85 85 { 86 86 return $this->RootURLFolder.$Target; 87 }88 89 function ShowAction(string $Id): string90 {91 $Output = '';92 $DbResult = $this->Database->query('SELECT *, `ActionIcon`.`Name` AS `Icon` FROM `Action` '.93 'LEFT JOIN `ActionIcon` ON `ActionIcon`.`Id` = `Action`.`Icon` '.94 'WHERE (`Action`.`Id`='.$Id.')');95 if ($DbResult->num_rows > 0)96 {97 $Action = $DbResult->fetch_assoc();98 if ($Action['Icon'] == '') $Action['Icon'] = 'clear.png';99 if (substr($Action['URL'], 0, 4) != 'http') $Action['URL'] = $this->Link($Action['URL']);100 if (!defined('NEW_PERMISSION') or ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('System', 'Read', 'Item', $Id))101 $Output .= '<img alt="'.$Action['Title'].'" src="'.$this->Link('/images/favicons/'.$Action['Icon']).102 '" width="16" height="16" /> <a href="'.$Action['URL'].'">'.$Action['Title'].'</a>';103 }104 return $Output;105 87 } 106 88 … … 233 215 unset($this->PageHeaders[$Name]); 234 216 } 217 218 static function Cast(System $System): Core 219 { 220 if ($System instanceof Core) 221 { 222 return $System; 223 } 224 throw new Exception('Expected ModuleSetup type but '.gettype($System)); 225 } 235 226 } 236 227 -
trunk/Application/View.php
r887 r896 119 119 $Output .= '<div id="Footer">'. 120 120 '<i>| Správa webu: '.$this->System->Config['Web']['Admin'].' | e-mail: '.$this->System->Config['Web']['AdminEmail'].' | '. 121 ' Verze: '.$Revision.' ('. $this->System->HumanDate($ReleaseTime).') |';121 ' Verze: '.$Revision.' ('.Core::Cast($this->System)->HumanDate($ReleaseTime).') |'; 122 122 if ($this->ShowRuntimeInfo == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time'). 123 123 ' s | Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B |';
Note:
See TracChangeset
for help on using the changeset viewer.