fix hostPageSnapId to hostPageId

This commit is contained in:
ghost 2023-07-31 01:28:11 +03:00
parent aacbdfebc8
commit a242d7b05a
2 changed files with 4 additions and 4 deletions

View File

@ -240,7 +240,7 @@ switch ($argv[1]) {
if (false !== preg_match(sprintf('!/hp/([\d/]+)/([\d]+)\.zip$!ui', $storage->directory), $hostPageSnapFilename, $matches)) {
if (!empty($matches[1]) && // hostPageSnapId
if (!empty($matches[1]) && // hostPageId
!empty($matches[2])) { // timeAdded
if (!$db->findHostPageSnapByTimeAdded($matches[1], $matches[2])) {

View File

@ -528,11 +528,11 @@ class MySQL {
return $query->fetch();
}
public function findHostPageSnapByTimeAdded(int $hostPageSnapId, int $timeAdded) {
public function findHostPageSnapByTimeAdded(int $hostPageId, int $timeAdded) {
$query = $this->_db->prepare('SELECT * FROM `hostPageSnap` WHERE `hostPageSnapId` = ? AND `timeAdded` = ? LIMIT 1');
$query = $this->_db->prepare('SELECT * FROM `hostPageSnap` WHERE `hostPageId` = ? AND `timeAdded` = ? LIMIT 1');
$query->execute([$hostPageSnapId, $timeAdded]);
$query->execute([$hostPageId, $timeAdded]);
return $query->fetch();
}