Changeset 492
- Timestamp:
- Feb 27, 2013, 10:12:48 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r491 r492 3 3 $Revision = 4 4 5 $ConfigFileName = dirname(__FILE__).'/../config.php';6 5 /* @var $System System */ 7 6 $System = NULL; … … 9 8 $Database = NULL; 10 9 10 $ConfigFileName = dirname(__FILE__).'/../config.php'; 11 11 if(file_exists($ConfigFileName)) include_once($ConfigFileName); 12 else die('Nenalezen konfigurační soubor '.$ConfigFileName.'!');13 12 include_once(dirname(__FILE__).'/Version.php'); 13 include_once(dirname(__FILE__).'/Update.php'); 14 14 include_once(dirname(__FILE__).'/Module.php'); 15 15 include_once(dirname(__FILE__).'/AppModule.php'); … … 267 267 function GlobalInit() 268 268 { 269 global $Config, $Database, $System, $ScriptTimeStart, $ConfigFileName, $Mail, $Type; 269 global $Config, $Database, $System, $ScriptTimeStart, $ConfigFileName, $Mail, $Type, 270 $DatabaseRevision; 270 271 271 272 date_default_timezone_set('Europe/Prague'); 272 273 $ScriptTimeStart = GetMicrotime(); 274 275 if(!isset($Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.'); 276 277 273 278 // SQL injection hack protection 274 279 foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item); … … 282 287 $Database->ShowSQLError = $Config['Web']['ShowSQLError']; 283 288 $Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery']; 289 290 // Check database persistence structure 291 $UpdateManager = new UpdateManager(); 292 $UpdateManager->Database = &$Database; 293 $UpdateManager->Revision = $DatabaseRevision; 294 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze.'); 295 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze.'); 284 296 285 297 $System = new System(); -
trunk/admin/index.php
r491 r492 16 16 $UpdateInterface->DatabaseRevision = $DatabaseRevision; 17 17 $UpdateInterface->Config = &$Config; 18 $UpdateInterface->Updates = &$Updates; 19 $UpdateInterface->FullInstall = 'FullInstall'; 18 20 $UpdateInterface->Show(); 19 21
Note:
See TracChangeset
for help on using the changeset viewer.