diff --git a/VKAPI/Handlers/Notes.php b/VKAPI/Handlers/Notes.php index ef8cd071..9f0e6eab 100644 --- a/VKAPI/Handlers/Notes.php +++ b/VKAPI/Handlers/Notes.php @@ -118,21 +118,6 @@ final class Notes extends VKAPIRequestHandler return 1; } - function deleteComment(int $comment_id, int $owner_id = 0) - { - $this->requireUser(); - $this->willExecuteWriteAction(); - - $comment = (new CommentsRepo)->get($comment_id); - - if(!$comment || !$comment->canBeDeletedBy($this->getUser())) - $this->fail(403, "Access to comment denied"); - - $comment->delete(); - - return 1; - } - function edit(string $note_id, string $title = "", string $text = "", int $privacy = 0, int $comment_privacy = 0, string $privacy_view = "", string $privacy_comment = "") { $this->requireUser(); @@ -159,23 +144,6 @@ final class Notes extends VKAPIRequestHandler return 1; } - function editComment(int $comment_id, string $message, int $owner_id = NULL) - { - $this->requireUser(); - $this->willExecuteWriteAction(); - - $comment = (new CommentsRepo)->get($comment_id); - - if($comment->getOwner()->getId() != $this->getUser()->getId()) - $this->fail(15, "Access to comment denied"); - - $comment->setContent($message); - $comment->setEdited(time()); - $comment->save(true); - - return 1; - } - function get(int $user_id, string $note_ids = "", int $offset = 0, int $count = 10, int $sort = 0) { $this->requireUser(); diff --git a/VKAPI/Handlers/Wall.php b/VKAPI/Handlers/Wall.php index 2929beb9..fde87fcb 100644 --- a/VKAPI/Handlers/Wall.php +++ b/VKAPI/Handlers/Wall.php @@ -513,6 +513,8 @@ final class Wall extends VKAPIRequestHandler $this->fail(100, "Poll does not exist"); if($attacc->getOwner()->getId() != $this->getUser()->getId()) $this->fail(43, "You do not have access to this poll"); + + $post->attach($attacc); } elseif($attachmentType == "audio") { $attacc = (new AudiosRepo)->getByOwnerAndVID($attachmentOwner, $attachmentId); if(!$attacc || $attacc->isDeleted()) @@ -864,7 +866,7 @@ final class Wall extends VKAPIRequestHandler $this->fail(158, "Post will have too many attachments"); foreach($attachs as $attach) { - if($attach && !$attach->isDeleted() && $attach->getOwner()->getId() == $this->getUser()->getId()) + if($attach && !$attach->isDeleted()) $post->attach($attach); else $this->fail(52, "One of the attachments is invalid"); @@ -908,7 +910,7 @@ final class Wall extends VKAPIRequestHandler $this->fail(158, "Post will have too many attachments"); foreach($attachs as $attach) { - if($attach && !$attach->isDeleted() && $attach->getOwner()->getId() == $this->getUser()->getId()) + if($attach && !$attach->isDeleted()) $comment->attach($attach); else $this->fail(52, "One of the attachments is invalid"); diff --git a/Web/Presenters/VideosPresenter.php b/Web/Presenters/VideosPresenter.php index 57e73f11..6f92891c 100644 --- a/Web/Presenters/VideosPresenter.php +++ b/Web/Presenters/VideosPresenter.php @@ -151,6 +151,6 @@ final class VideosPresenter extends OpenVKPresenter $video->toggleLike($this->user->identity); } - $this->redirect("$_SERVER[HTTP_REFERER]"); + $this->returnJson(["success" => true]); } } diff --git a/Web/static/css/dialog.css b/Web/static/css/dialog.css index 4e97b411..c264dbb6 100644 --- a/Web/static/css/dialog.css +++ b/Web/static/css/dialog.css @@ -154,12 +154,7 @@ body.dimmed > .dimmer { background: white; padding-right: 6px; max-height: 400px; - overflow-y: scroll; -} - -/* Работает только в хроме, потому что в фурифоксе до сих пор нет кастомных скроллбаров лул */ -.left_block::-webkit-scrollbar { - width: 0; + overflow-y: auto; } .right_block { diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 08a9a733..3fc96ce0 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -558,7 +558,7 @@ $(document).on("click", "#videoOpen", async (e) => { ` } else { player = ` -