Changeset 67 for trunk/Application.php
- Timestamp:
- Jan 3, 2016, 11:52:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application.php
r64 r67 3 3 class Application 4 4 { 5 var $Database; 6 5 7 function Start() 6 8 { 7 global $Config, $Database ;9 global $Config, $DatabaseRevision; 8 10 9 11 $FileName = dirname(__FILE__).'/config.php'; … … 19 21 $ErrorHandler->Start(); 20 22 21 $ Database = new Database();22 $ Database->Connect($Config['Database']['Host'], $Config['Database']['User'],23 $this->Database = new Database(); 24 $this->Database->Connect($Config['Database']['Host'], $Config['Database']['User'], 23 25 $Config['Database']['Password'], $Config['Database']['Database']); 24 $ Database->Prefix = $Config['Database']['Prefix'];25 $ Database->charset($Config['Database']['Charset']);26 $ Database->ShowSQLError = $Config['Web']['ShowSQLError'];27 $ Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery'];26 $this->Database->Prefix = $Config['Database']['Prefix']; 27 $this->Database->charset($Config['Database']['Charset']); 28 $this->Database->ShowSQLError = $Config['Web']['ShowSQLError']; 29 $this->Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery']; 28 30 29 31 // SQL injection hack protection … … 31 33 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 32 34 35 // Check database persistence structure 36 $UpdateManager = new UpdateManager(); 37 $UpdateManager->Database = $this->Database; 38 $UpdateManager->Revision = $DatabaseRevision; 39 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze.'); 40 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze.'); 41 33 42 } 34 43 }
Note:
See TracChangeset
for help on using the changeset viewer.