mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
parent
cacc223eb9
commit
e66a96be6e
3 changed files with 7 additions and 0 deletions
|
@ -72,6 +72,8 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(empty($this->postParam("name")))
|
if(empty($this->postParam("name")))
|
||||||
$this->flashFail("err", tr("error"), tr("error_segmentation"));
|
$this->flashFail("err", tr("error"), tr("error_segmentation"));
|
||||||
|
else if(strlen($this->postParam("name")) > 36)
|
||||||
|
$this->flashFail("err", tr("error"), tr("error_data_too_big", "name", 36, "bytes"));
|
||||||
|
|
||||||
$album = new Album;
|
$album = new Album;
|
||||||
$album->setOwner(isset($club) ? $club->getId() * -1 : $this->user->id);
|
$album->setOwner(isset($club) ? $club->getId() * -1 : $this->user->id);
|
||||||
|
@ -100,6 +102,9 @@ final class PhotosPresenter extends OpenVKPresenter
|
||||||
$this->template->album = $album;
|
$this->template->album = $album;
|
||||||
|
|
||||||
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
if($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
|
if(strlen($this->postParam("name")) > 36)
|
||||||
|
$this->flashFail("err", tr("error"), tr("error_data_too_big", "name", 36, "bytes"));
|
||||||
|
|
||||||
$album->setName(empty($this->postParam("name")) ? $album->getName() : $this->postParam("name"));
|
$album->setName(empty($this->postParam("name")) ? $album->getName() : $this->postParam("name"));
|
||||||
$album->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
$album->setDescription(empty($this->postParam("desc")) ? NULL : $this->postParam("desc"));
|
||||||
$album->setEdited(time());
|
$album->setEdited(time());
|
||||||
|
|
|
@ -776,6 +776,7 @@
|
||||||
"error_new_password" = "New password does not match";
|
"error_new_password" = "New password does not match";
|
||||||
"error_shorturl_incorrect" = "The short address has an incorrect format.";
|
"error_shorturl_incorrect" = "The short address has an incorrect format.";
|
||||||
"error_repost_fail" = "Failed to share post";
|
"error_repost_fail" = "Failed to share post";
|
||||||
|
"error_data_too_big" = "Attribute '$1' must be at most $2 $3 long";
|
||||||
|
|
||||||
"forbidden" = "Access error";
|
"forbidden" = "Access error";
|
||||||
"forbidden_comment" = "This user's privacy settings do not allow you to look at his page.";
|
"forbidden_comment" = "This user's privacy settings do not allow you to look at his page.";
|
||||||
|
|
|
@ -819,6 +819,7 @@
|
||||||
"error_new_password" = "Новые пароли не совпадает";
|
"error_new_password" = "Новые пароли не совпадает";
|
||||||
"error_shorturl_incorrect" = "Короткий адрес имеет некорректный формат.";
|
"error_shorturl_incorrect" = "Короткий адрес имеет некорректный формат.";
|
||||||
"error_repost_fail" = "Не удалось поделиться записью";
|
"error_repost_fail" = "Не удалось поделиться записью";
|
||||||
|
"error_data_too_big" = "Аттрибут '$1' не может быть длиннее $2 $3";
|
||||||
|
|
||||||
"forbidden" = "Ошибка доступа";
|
"forbidden" = "Ошибка доступа";
|
||||||
"forbidden_comment" = "Настройки приватности этого пользователя не разрешают вам смотреть на его страницу.";
|
"forbidden_comment" = "Настройки приватности этого пользователя не разрешают вам смотреть на его страницу.";
|
||||||
|
|
Loading…
Reference in a new issue