Changeset 525
- Timestamp:
- Apr 20, 2013, 11:47:25 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r524 r525 22 22 23 23 // Application modules 24 // TODO: Should be configurable 24 25 include_once(dirname(__FILE__).'/../Modules/System/System.php'); 25 26 include_once(dirname(__FILE__).'/../Modules/Error/Error.php'); … … 63 64 64 65 $System = new System(); 66 // TODO: unset general global variable $Config after setting is loaded to objects 65 67 $System->Config = &$Config; 66 68 $System->Database->Connect($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); … … 82 84 83 85 // Register new modules 86 // TODO: Should be configurable 84 87 $System->ModuleManager->RegisterModule(new ModuleError($System)); 85 88 $System->ModuleManager->RegisterModule(new ModuleSystem($System)); 86 89 $System->ModuleManager->RegisterModule(new ModuleLog($System)); 87 90 $System->ModuleManager->RegisterModule(new ModuleFile($System)); 91 $System->ModuleManager->RegisterModule(new ModuleUser($System)); 88 92 $System->ModuleManager->RegisterModule(new ModuleMeteostation($System)); 89 93 $System->ModuleManager->RegisterModule(new ModulePortal($System)); … … 95 99 $System->ModuleManager->RegisterModule(new ModuleChat($System)); 96 100 $System->ModuleManager->RegisterModule(new ModuleWebCam($System)); 97 $System->ModuleManager->RegisterModule(new ModuleUser($System));98 101 $System->ModuleManager->RegisterModule(new ModuleFinance($System)); 99 102 $System->ModuleManager->RegisterModule(new ModuleFinanceBankAPI($System)); -
trunk/Common/Page.php
r524 r525 13 13 var $FullTitle; 14 14 15 function __construct( )15 function __construct($System) 16 16 { 17 17 global $Config; 18 19 parent::__construct($System); 18 20 19 21 $this->FormatHTML = $Config['Web']['FormatHTML']; … … 46 48 { 47 49 $PageClass = $Page->ParentClass; 48 $Page = new $PageClass( );50 $Page = new $PageClass($this->System); 49 51 $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '/')); 50 52 } else $Page = null; -
trunk/Modules/Chat/Chat.php
r524 r525 3 3 class PageChatHistory extends Page 4 4 { 5 function __construct( )5 function __construct($System) 6 6 { 7 parent::__construct( );7 parent::__construct($System); 8 8 $this->FullTitle = 'Výpis z historie chatu'; 9 9 $this->ShortTitle = 'Historie chatu'; -
trunk/Modules/Network/Administration.php
r524 r525 3 3 class PageNetworkAdministration extends Page 4 4 { 5 function __construct( )5 function __construct($System) 6 6 { 7 parent::__construct( );7 parent::__construct($System); 8 8 $this->FullTitle = 'Administrace sítě'; 9 9 $this->ShortTitle = 'Administrace sítě'; -
trunk/Modules/Network/Subnet.php
r519 r525 3 3 class PageSubnet extends Page 4 4 { 5 function __construct( )5 function __construct($System) 6 6 { 7 parent::__construct( );7 parent::__construct($System); 8 8 $this->FullTitle = 'Informace o podsítích'; 9 9 $this->ShortTitle = 'Podsítě'; -
trunk/Modules/News/NewsPage.php
r524 r525 163 163 $DbResult = $this->Database->query('SELECT * FROM News WHERE Id='.$_GET['id']); 164 164 $Row = $DbResult->fetch_array(); 165 if($this->System-> Modules['User']->User['Id'] == $Row['User'])165 if($this->System->User->User['Id'] == $Row['User']) 166 166 { 167 167 if($Row['Enclosure'] != '') … … 179 179 break; 180 180 default: 181 if($this->System-> Modules['User']->CheckPermission('News', 'Display', 'Group', $Category))181 if($this->System->User->CheckPermission('News', 'Display', 'Group', $Category)) 182 182 { 183 183 $PerPage = 20; … … 197 197 else $Author = $Row['Name']; 198 198 $Output .= '<div class="Panel"><div class="Title"><a href="?action=view&id='.$Row['Id'].'">'.$Row['Title'].'</a> ('.HumanDate($Row['Date']).', '.$Author.')'; 199 if($this->System-> Modules['User']->User['Id'] == $Row['User'])199 if($this->System->User->User['Id'] == $Row['User']) 200 200 { 201 201 $Output .= '<div class="Action">'; -
trunk/Modules/System/System.php
r523 r525 3 3 class PageModules extends Page 4 4 { 5 function __construct( )6 { 7 parent::__construct( );5 function __construct($System) 6 { 7 parent::__construct($System); 8 8 $this->FullTitle = 'Správa modulů'; 9 9 $this->ShortTitle = 'Moduly';
Note:
See TracChangeset
for help on using the changeset viewer.