Changeset 589 for trunk/Common/System.php
- Timestamp:
- Nov 1, 2013, 4:22:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/System.php
r583 r589 119 119 $this->Config = &$Config; 120 120 121 $this->Database->Connect($this->Config['Database']['Host'], $this->Config['Database']['User'], 122 $this->Config['Database']['Password'], $this->Config['Database']['Database']); 123 $this->Database->Prefix = $this->Config['Database']['Prefix']; 124 $this->Database->charset($this->Config['Database']['Charset']); 125 $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError']; 126 $this->Database->ShowSQLQuery = $this->Config['Web']['ShowSQLQuery']; 121 try { 122 $this->Database->Connect($this->Config['Database']['Host'], $this->Config['Database']['User'], 123 $this->Config['Database']['Password'], $this->Config['Database']['Database']); 124 $this->Database->Prefix = $this->Config['Database']['Prefix']; 125 $this->Database->charset($this->Config['Database']['Charset']); 126 $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError']; 127 $this->Database->ShowSQLQuery = $this->Config['Web']['ShowSQLQuery']; 128 } catch (Exception $E) { 129 //$Output .= 'Nelze se připojit k databázi.'; 130 } 127 131 $this->RootURLFolder = $this->Config['Web']['RootFolder']; 128 132 $this->FormManager->Root = $this->Config['Web']['RootFolder']; 129 130 // Check database persistence structure131 $UpdateManager = new UpdateManager();132 $UpdateManager->Database = &$this->Database;133 $UpdateManager->Revision = $DatabaseRevision;134 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze.');135 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze.');136 133 137 134 $Database = $this->Database; … … 142 139 $this->ModuleManager->RegisterModule(new ModuleSetup($this)); 143 140 $this->ModuleManager->Modules['Setup']->Start(); 144 $this->ModuleManager->LoadModules(); 145 $this->ModuleManager->Modules['Setup']->Start(); 146 $this->ModuleManager->StartAll(); 141 if($this->ModuleManager->Modules['Setup']->CheckState()) 142 { 143 $this->ModuleManager->LoadModules(); 144 $this->ModuleManager->Modules['Setup']->Start(); 145 $this->ModuleManager->StartAll(); 146 } 147 147 if($this->ShowPage) 148 148 {
Note:
See TracChangeset
for help on using the changeset viewer.