From de937f65a1f7e88f68629fb328db88ae6bfcebe1 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Sun, 10 Nov 2024 16:27:47 +0300 Subject: [PATCH] self-review --- VKAPI/Handlers/Video.php | 2 +- VKAPI/Handlers/Wall.php | 2 +- Web/Presenters/templates/@layout.xml | 4 +- .../templates/components/post/oldpost.xml | 1 + Web/static/js/al_wall.js | 198 ++++++++++-------- bootstrap.php | 2 +- ...-fields.sql => 00050-new-video-fields.sql} | 0 7 files changed, 114 insertions(+), 95 deletions(-) rename install/sqls/{000XX-new-video-fields.sql => 00050-new-video-fields.sql} (100%) diff --git a/VKAPI/Handlers/Video.php b/VKAPI/Handlers/Video.php index a296a17c..3a14f048 100755 --- a/VKAPI/Handlers/Video.php +++ b/VKAPI/Handlers/Video.php @@ -24,7 +24,7 @@ final class Video extends VKAPIRequestHandler $items = []; $video = (new VideosRepo)->getByOwnerAndVID(intval($id[0]), intval($id[1])); - if($video) { + if($video && !$video->isDeleted()) { $out_video = $video->getApiStructure($this->getUser())->video; $items[] = $out_video; if($out_video['owner_id']) { diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index f7c6a9b1..4b711827 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -1026,7 +1026,7 @@ final class Wall extends VKAPIRequestHandler } } - if(empty($message) && empty($attachments)) + if(empty($message) && sizeof($final_attachments) < 1) $this->fail(100, "Required parameter 'message' missing."); if(!$comment || $comment->isDeleted()) diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index 5cbc6c42..8dac6089 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -366,7 +366,7 @@