diff --git a/Web/Presenters/ReportPresenter.php b/Web/Presenters/ReportPresenter.php index de03a5e7..64ca900f 100644 --- a/Web/Presenters/ReportPresenter.php +++ b/Web/Presenters/ReportPresenter.php @@ -50,7 +50,7 @@ final class ReportPresenter extends OpenVKPresenter exit(json_encode([ "error" => tr("error_segmentation") ])); // At this moment, only Posts will be implemented - if($this->queryParam("type") == 'posts') { + if($this->queryParam("type") == 'post') { $post = (new Posts)->get(intval($id)); if(!$post) exit(json_encode([ "error" => "Unable to report nonexistent content" ])); diff --git a/Web/Presenters/templates/Wall/Post.xml b/Web/Presenters/templates/Wall/Post.xml index 509963b3..32371192 100644 --- a/Web/Presenters/templates/Wall/Post.xml +++ b/Web/Presenters/templates/Wall/Post.xml @@ -46,7 +46,7 @@ (function() { res = document.querySelector("#uReportMsgInput").value; xhr = new XMLHttpRequest(); - xhr.open("GET", "/report.pl/" + {$post->getId()} + "?reason=" + res + "&type=posts", true); + xhr.open("GET", "/report.pl/" + {$post->getId()} + "?reason=" + res + "&type=post", true); xhr.onload = (function() { if(xhr.responseText.indexOf("reason") === -1) MessageBox("Ошибка", "Не удалось подать жалобу...", ["OK"], [Function.noop]);