Changeset 858 for trunk/includes
- Timestamp:
- Jan 21, 2016, 9:54:58 AM (9 years ago)
- Location:
- trunk/includes
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Global.php
r856 r858 2 2 3 3 include_once(dirname(__FILE__).'/../Packages/Common/Common.php'); 4 include_once(dirname(__FILE__).'/System.php');5 include_once(dirname(__FILE__).'/Update.php');6 include_once(dirname(__FILE__).'/PageEdit.php');7 4 if(file_exists(dirname(__FILE__).'/../Config/Config.php')) 8 5 include_once(dirname(__FILE__).'/../Config/Config.php'); 9 else die('Config file Config/Config.php not found'); 6 include_once(dirname(__FILE__).'/System.php'); 7 include_once(dirname(__FILE__).'/../Application/DefaultConfig.php'); 8 include_once(dirname(__FILE__).'/PageEdit.php'); 10 9 include_once(dirname(__FILE__).'/../Application/Version.php'); 11 10 require_once(dirname(__FILE__).'/../HTML/BBCodeParser2.php'); -
trunk/includes/System.php
r855 r858 29 29 $this->Config = $Config; 30 30 date_default_timezone_set($this->Config['Web']['Timezone']); 31 31 mb_internal_encoding("UTF-8"); 32 33 if(isset($this->Config['Database'])) 34 { 32 35 $this->Database->Connect($this->Config['Database']['Host'], 33 36 $this->Config['Database']['User'], $this->Config['Database']['Password'], … … 37 40 $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError']; 38 41 $this->Database->LogSQLQuery = $this->Config['Web']['LogSQLQuery']; 42 } 39 43 40 44 $this->LocaleManager = new LocaleManager($this); … … 88 92 { 89 93 global $ScriptStartTime, $TranslationTree, $StopAfterUpdateManager, 90 $UpdateManager , $DatabaseRevision;94 $UpdateManager; 91 95 92 96 $ScriptStartTime = GetMicrotime(); 93 97 if(GetRemoteAddress() != '') session_start(); 94 95 if(!isset($this->Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.');96 97 $this->Init();98 99 // Check database persistence structure100 $UpdateManager = new UpdateManager();101 $UpdateManager->Database = $this->Database;102 $UpdateManager->Revision = $DatabaseRevision;103 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze. Pokračujte <a href="'.$this->Link('/Application/install.php').'">zde</a>');104 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze. Pokračujte <a href="'.$this->Link('/Application/install.php').'">zde</a>');105 98 106 99 // SQL injection hack protection … … 112 105 } 113 106 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($_GET[$Index]); 107 108 $this->Init(); 109 110 // Register and start existing modules 111 $this->Setup = new Setup($this); 112 $this->Setup->Start(); 113 $this->Setup->UpdateManager->VersionTable = 'DbVersion'; 114 if($this->Setup->CheckState()) 115 { 116 $this->ModuleManager->Start(); 117 } 114 118 115 119 // TODO: Global initialized variable should be removed
Note:
See TracChangeset
for help on using the changeset viewer.