Ignore:
Timestamp:
Nov 1, 2013, 4:22:59 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Správa instalace webu přetvořena z podadresáře admin do modulu Setup. Modul setup musí být funkční i v případě nenastavené nebo nedostupné databáze, konfiguračního souboru či neinstalované nebo neaktuální databáze.
  • Přidáno: Metody Disconnect a Connected do třídy Database.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/System.php

    r583 r589  
    119119    $this->Config = &$Config;
    120120   
    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    }
    127131    $this->RootURLFolder = $this->Config['Web']['RootFolder'];
    128132    $this->FormManager->Root = $this->Config['Web']['RootFolder'];
    129  
    130     // Check database persistence structure
    131     $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.');
    136133 
    137134    $Database = $this->Database;
     
    142139    $this->ModuleManager->RegisterModule(new ModuleSetup($this));
    143140    $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    }
    147147    if($this->ShowPage)
    148148    {
Note: See TracChangeset for help on using the changeset viewer.