Changeset 10 for Common/Update.php


Ignore:
Timestamp:
Apr 7, 2020, 8:52:35 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Update.php

    r9 r10  
    2323    $DbResult = $this->Database->select($this->VersionTable, '*', 'Id=1');
    2424    $Version = $DbResult->fetch_assoc();
    25     return($Version['Revision']);
     25    return $Version['Revision'];
    2626  }
    2727
     
    2929  {
    3030    $DbResult = $this->Database->query('SHOW TABLES LIKE "'.$this->VersionTable.'"');
    31     return($DbResult->num_rows > 0);
     31    return $DbResult->num_rows > 0;
    3232  }
    3333
    3434  function IsUpToDate()
    3535  {
    36     return($this->Revision <= $this->GetDbVersion());
     36    return $this->Revision <= $this->GetDbVersion();
    3737  }
    3838
     
    4141    $DbRevision = $this->GetDbVersion();
    4242    $Output = 'Počáteční revize databáze: '.$DbRevision.'<br/>';
    43     while($this->Revision > $DbRevision)
     43    while ($this->Revision > $DbRevision)
    4444    {
    45       if(!array_key_exists($DbRevision, $this->Trace))
     45      if (!array_key_exists($DbRevision, $this->Trace))
    4646        die('Missing upgrade trace for revision '.$DbRevision);
    4747      $TraceItem = $this->Trace[$DbRevision];
     
    5656        $TraceItem['Revision'].' WHERE `Id`=1');
    5757    }
    58     return($Output);
     58    return $Output;
    5959  }
    6060
     
    8181    echo($Query.';<br/>');
    8282    flush();
    83     return($this->Database->query($Query));
     83    return $this->Database->query($Query);
    8484  }
    8585}
Note: See TracChangeset for help on using the changeset viewer.