From 0fe387bd3621ec39dd5a6fd0f6b82c43b89adbed Mon Sep 17 00:00:00 2001 From: "E. S." Date: Fri, 15 Mar 2024 00:39:08 +0000 Subject: [PATCH] fix --- handler/MainHandler.php | 2 +- lib/posts.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/MainHandler.php b/handler/MainHandler.php index 7d66e8e..71a0772 100644 --- a/handler/MainHandler.php +++ b/handler/MainHandler.php @@ -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) diff --git a/lib/posts.php b/lib/posts.php index 02a08c6..a7e71b9 100644 --- a/lib/posts.php +++ b/lib/posts.php @@ -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'];