From a242d7b05ab4d399bcc15268d11af8953969ebb1 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 31 Jul 2023 01:28:11 +0300 Subject: [PATCH] fix hostPageSnapId to hostPageId --- cli/yggo.php | 2 +- library/mysql.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/yggo.php b/cli/yggo.php index d2a50c4..49c2197 100644 --- a/cli/yggo.php +++ b/cli/yggo.php @@ -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])) { diff --git a/library/mysql.php b/library/mysql.php index d9b7d5e..edbd8e7 100644 --- a/library/mysql.php +++ b/library/mysql.php @@ -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(); }