Ignore:
Timestamp:
Feb 22, 2015, 11:05:49 PM (9 years ago)
Author:
chronos
Message:
  • Remove: Trailing spaces from end of lines from all files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Update.php

    r805 r815  
    88  var $Database;
    99  var $InstallMethod;
    10  
     10
    1111  function __construct()
    1212  {
     
    1515          $this->VersionTable = 'DbVersion';
    1616  }
    17  
     17
    1818  function GetDbVersion()
    1919  {
    2020          $DbResult = $this->Database->select('DbVersion', '*', 'Id=1');
    21           $Version = $DbResult->fetch_assoc();   
     21          $Version = $DbResult->fetch_assoc();
    2222    return($Version['Revision']);
    2323  }
    24  
     24
    2525  function IsInstalled()
    26   {     
     26  {
    2727          $DbResult = $this->Database->query('SHOW TABLES LIKE "'.$this->VersionTable.'"');
    2828    return($DbResult->num_rows > 0);
     
    3333          return($this->Revision <= $this->GetDbVersion());
    3434  }
    35  
     35
    3636  function Update()
    3737  {
    3838          $DbRevision = $this->GetDbVersion();
    39         $Output = 'Počáteční revize databáze: '.$DbRevision.'<br/>'; 
     39        $Output = 'Počáteční revize databáze: '.$DbRevision.'<br/>';
    4040          while($this->Revision > $DbRevision)
    4141    {
    4242            $TraceItem = $this->Trace[$DbRevision];
    43             $Output .= 'Aktualizace na verzi: '.$TraceItem['Revision'].'<br/>';     
    44             $RevUpdate = $TraceItem['Function'];         
     43            $Output .= 'Aktualizace na verzi: '.$TraceItem['Revision'].'<br/>';
     44            $RevUpdate = $TraceItem['Function'];
    4545            $RevUpdate($this);
    4646            $DbRevision = $TraceItem['Revision'];
    4747            $this->Database->query('UPDATE `DbVersion` SET `Revision`= '.$TraceItem['Revision'].' WHERE `Id`=1');
    4848          }
    49           return($Output);       
     49          return($Output);
    5050  }
    51  
     51
    5252  function Install()
    53   {     
    54         $InstallMethod = $this->InstallMethod; 
     53  {
     54        $InstallMethod = $this->InstallMethod;
    5555        $InstallMethod($this);
    5656        $this->Update();
    5757  }
    58  
     58
    5959  function Uninstall()
    6060  {
    61    
     61
    6262  }
    63  
     63
    6464  function Execute($Query)
    6565  {
Note: See TracChangeset for help on using the changeset viewer.