Changeset 712 for trunk/inc/realm.php


Ignore:
Timestamp:
Jul 30, 2013, 11:34:19 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Aktualizace inicializačního skriptu pro sql databázi na revizi 710.
  • Upraveno: Aktualizována třída Database na novější využívající třídu PDO a generující výjímky při chybě, které je pak nutno očetřit.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        55minimanager
        66mmfpm
         7.settings
         8.buildpath
         9.project
  • trunk/inc/realm.php

    r695 r712  
    1313    $DbResult = $this->Database->query('SELECT * FROM Realm WHERE Id='.$Id.' AND Enabled=1');
    1414    $this->Data = $DbResult->fetch_assoc();
    15     $this->CharactersDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseCharacters']);
     15    $this->CharactersDatabase = new Database();
     16    $this->CharactersDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseCharacters']);
    1617    $this->CharactersDatabase->select_db($this->Data['DatabaseCharacters']);
    17     if($this->CharactersDatabase->connect_error)
    18     {
    19       die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->Database->connect_error);
    20     }
     18    //if($this->CharactersDatabase->connect_error)
     19    //{
     20    //  die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->Database->connect_error);
     21    //}
    2122    $this->CharactersDatabase->charset($this->Config['Database']['Charset']);
    2223   
    23     $this->MangosDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseMangos']);
     24    $this->MangosDatabase = new Database();
     25    $this->MangosDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseMangos']);
    2426    $this->MangosDatabase->select_db($this->Data['DatabaseMangos']);
    25     if($this->MangosDatabase->connect_error)
    26     {
    27       die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->MangosDatabase->connect_error);
    28     }
     27    //if($this->MangosDatabase->connect_error)
     28    //{
     29    //  die('Přihlášení k databázi realmu '.$this->Id.' selhalo: '.$this->MangosDatabase->connect_error);
     30    //}
    2931    $this->MangosDatabase->charset($this->Config['Database']['Charset']);
    3032  }
Note: See TracChangeset for help on using the changeset viewer.