mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-24 13:34:25 +00:00
fix image description updates timing
This commit is contained in:
parent
2c5ca1b630
commit
0ffcee1efb
@ -342,6 +342,7 @@ try {
|
||||
$lastHostImageDescription->alt,
|
||||
$lastHostImageDescription->title,
|
||||
$hostImageData,
|
||||
time(),
|
||||
time());
|
||||
}
|
||||
}
|
||||
@ -628,7 +629,8 @@ try {
|
||||
$imageAlt,
|
||||
$imageTitle,
|
||||
null,
|
||||
time());
|
||||
time(),
|
||||
null);
|
||||
|
||||
// Relate host image with host page was found
|
||||
$db->setHostImageToHostPage($hostImageId, $queueHostPage->hostPageId, time(), 1);
|
||||
|
@ -263,7 +263,8 @@ class MySQL {
|
||||
string $alt,
|
||||
string $title,
|
||||
mixed $data,
|
||||
int $time) {
|
||||
int $timeAdded,
|
||||
mixed $timeUpdated) {
|
||||
|
||||
$query = $this->_db->prepare('INSERT INTO `hostImageDescription` (`hostImageId`,
|
||||
`crc32id`,
|
||||
@ -275,7 +276,7 @@ class MySQL {
|
||||
`title` = ?,
|
||||
`timeUpdated` = ?');
|
||||
|
||||
$query->execute([$hostImageId, $crc32id, $alt, $title, $time, $alt, $title, $time]);
|
||||
$query->execute([$hostImageId, $crc32id, $alt, $title, $timeAdded, $alt, $title, $timeUpdated]);
|
||||
|
||||
return $this->_db->lastInsertId();
|
||||
}
|
||||
@ -283,7 +284,8 @@ class MySQL {
|
||||
public function setHostImageDescriptionData(int $hostImageId,
|
||||
int $crc32id,
|
||||
mixed $data,
|
||||
int $time) {
|
||||
int $timeAdded,
|
||||
mixed $timeUpdated) {
|
||||
|
||||
$query = $this->_db->prepare('INSERT INTO `hostImageDescription` (`hostImageId`,
|
||||
`crc32id`,
|
||||
@ -292,7 +294,7 @@ class MySQL {
|
||||
|
||||
ON DUPLICATE KEY UPDATE `timeUpdated` = ?');
|
||||
|
||||
$query->execute([$hostImageId, $crc32id, $data, $time, $time]);
|
||||
$query->execute([$hostImageId, $crc32id, $data, $timeAdded, $timeUpdated]);
|
||||
|
||||
return $this->_db->lastInsertId();
|
||||
}
|
||||
|
@ -431,7 +431,8 @@ if (!empty($q)) {
|
||||
$db->setHostImageDescriptionData($result->id,
|
||||
crc32($hostImageURLencoded),
|
||||
$hostImage->crawlMetaOnly ? null : $hostImageURLencoded,
|
||||
time());
|
||||
time(),
|
||||
null);
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user