mirror of
https://github.com/openvk/openvk
synced 2025-04-23 08:33:02 +03:00
limites
This commit is contained in:
parent
f4df916a7a
commit
28655503e1
2 changed files with 20 additions and 16 deletions
|
@ -90,6 +90,7 @@ final class CommentPresenter extends OpenVKPresenter
|
|||
$un = rtrim($this->postParam("videos"), ",");
|
||||
$arr = explode(",", $un);
|
||||
|
||||
if(sizeof($arr) < 11) {
|
||||
foreach($arr as $dat) {
|
||||
$ids = explode("_", $dat);
|
||||
$video = (new Videos)->getByOwnerAndVID((int)$ids[0], (int)$ids[1]);
|
||||
|
@ -100,6 +101,7 @@ final class CommentPresenter extends OpenVKPresenter
|
|||
$videos[] = $video;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($this->postParam("text")) && !$photo && !$video)
|
||||
$this->flashFail("err", "Не удалось опубликовать комментарий", "Комментарий пустой или слишком большой.");
|
||||
|
|
|
@ -299,6 +299,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$un = rtrim($this->postParam("videos"), ",");
|
||||
$arr = explode(",", $un);
|
||||
|
||||
if(sizeof($arr) < 11) {
|
||||
foreach($arr as $dat) {
|
||||
$ids = explode("_", $dat);
|
||||
$video = (new Videos)->getByOwnerAndVID((int)$ids[0], (int)$ids[1]);
|
||||
|
@ -309,6 +310,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$videos[] = $video;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($this->postParam("text")) && !$photo && sizeof($videos) < 1 && !$poll && !$note)
|
||||
$this->flashFail("err", tr("failed_to_publish_post"), tr("post_is_empty_or_too_big"));
|
||||
|
|
Loading…
Reference in a new issue