Changeset 723 for trunk/Modules/Import
- Timestamp:
- Jan 7, 2014, 4:40:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Import/Import.php
r720 r723 230 230 } 231 231 $Output .= '<br />Celkem: '.$Count.' Nových: '.$this->NewItemCount.'<br />'; 232 $this-> System->Database->query('UPDATE `Group` SET `LastVersion` = "'.$this->Version['BuildNumber'].'", `LastImport` = NOW() WHERE `Id`='.$this->Group['Id']);232 $this->UpdateLastVersion(); 233 233 } 234 234 // else $Output .= ShowMessage('Již importován pro verzi '.$this->Version['Version'], MESSAGE_CRITICAL); … … 387 387 } 388 388 $Output .= '<br />Celkem: '.$Count.' Nových: '.$this->NewItemCount.'<br />'; 389 $ System->Database->query('UPDATE `Group` SET `LastVersion` = "'.$this->Version['BuildNumber'].'", `LastImport` = NOW() WHERE `Id`='.$this->Group['Id']);389 $this->UpdateLastVersion(); 390 390 } 391 391 $Output .= '<strong>Dokončeno.</strong>'; … … 520 520 } 521 521 $Output = '<br />Celkem: '.$Count.' Nových: '.$this->NewItemCount.'<br />'; 522 $this-> System->Database->query('UPDATE `Group` SET `LastVersion` = "'.$this->Version['BuildNumber'].'", `LastImport` = NOW() WHERE `Id`='.$this->Group['Id']);522 $this->UpdateLastVersion(); 523 523 return($Output); 524 524 } 525 function UpdateLastVersion() { 526 $DbResult = $this->System->Database->query('SELECT * FROM `Group` WHERE `Id`='.$this->Group['Id']); 527 $Version = $DbResult->fetch_assoc(); 528 if ($Version['LastVersion'] < $this->Version['BuildNumber']) 529 $this->System->Database->query('UPDATE `Group` SET `LastVersion` = "'.$this->Version['BuildNumber'].'", `LastImport` = NOW() WHERE `Id`='.$this->Group['Id']); 530 } 525 531 }
Note:
See TracChangeset
for help on using the changeset viewer.