This commit is contained in:
E. S. 2024-03-15 00:39:08 +00:00
parent a8889a293e
commit 0fe387bd36
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class MainHandler extends request_handler {
add_meta([
'$title' => $pt->title,
'$url', $config['domain'].$post->getUrl(),
'$url' => $config['domain'].$post->getUrl(),
'$description' => $pt->getDescriptionPreview(155)
]);
if (($img = $pt->getFirstImage()) !== null)

View File

@ -359,7 +359,7 @@ class posts {
*/
static function getWithUpload(Upload $upload): array {
$db = DB();
$q = $db->query("SELECT id FROM posts_texts WHERE md LIKE '%{image,{$upload->randomId}%'");
$q = $db->query("SELECT id FROM posts_texts WHERE md LIKE '%{image:{$upload->randomId}%'");
$ids = [];
while ($row = $db->fetch($q))
$ids[] = (int)$row['id'];