Changeset 10 for Common/Update.php
- Timestamp:
- Apr 7, 2020, 8:52:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Update.php
r9 r10 23 23 $DbResult = $this->Database->select($this->VersionTable, '*', 'Id=1'); 24 24 $Version = $DbResult->fetch_assoc(); 25 return ($Version['Revision']);25 return $Version['Revision']; 26 26 } 27 27 … … 29 29 { 30 30 $DbResult = $this->Database->query('SHOW TABLES LIKE "'.$this->VersionTable.'"'); 31 return ($DbResult->num_rows > 0);31 return $DbResult->num_rows > 0; 32 32 } 33 33 34 34 function IsUpToDate() 35 35 { 36 return ($this->Revision <= $this->GetDbVersion());36 return $this->Revision <= $this->GetDbVersion(); 37 37 } 38 38 … … 41 41 $DbRevision = $this->GetDbVersion(); 42 42 $Output = 'Počáteční revize databáze: '.$DbRevision.'<br/>'; 43 while ($this->Revision > $DbRevision)43 while ($this->Revision > $DbRevision) 44 44 { 45 if (!array_key_exists($DbRevision, $this->Trace))45 if (!array_key_exists($DbRevision, $this->Trace)) 46 46 die('Missing upgrade trace for revision '.$DbRevision); 47 47 $TraceItem = $this->Trace[$DbRevision]; … … 56 56 $TraceItem['Revision'].' WHERE `Id`=1'); 57 57 } 58 return ($Output);58 return $Output; 59 59 } 60 60 … … 81 81 echo($Query.';<br/>'); 82 82 flush(); 83 return ($this->Database->query($Query));83 return $this->Database->query($Query); 84 84 } 85 85 }
Note:
See TracChangeset
for help on using the changeset viewer.