From 40338a67fc587dd64adc52acfee8e45911ee463e Mon Sep 17 00:00:00 2001 From: veselcraft Date: Tue, 26 Apr 2022 10:23:16 +0300 Subject: [PATCH] =?UTF-8?q?=D1=87=D0=B5=D1=82=20=D1=8F=20=D1=81=D0=B5?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D1=83=D0=BB=20=D0=BB=D0=BE=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/Presenters/WallPresenter.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 7fd59994..79aaafb6 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -260,19 +260,15 @@ final class WallPresenter extends OpenVKPresenter $photos[] = Photo::fastMake($this->user->id, $this->postParam("text"), $file, $album, $anon); } - } catch(\DomainException $ex) { - $this->flashFail("err", "Не удалось опубликовать пост", "Файл медиаконтента повреждён."); - } catch(ISE $ex) { - $this->flashFail("err", "Не удалось опубликовать пост", "Файл медиаконтента повреждён или слишком велик."); - } + } catch(\DomainException $ex) { + $this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted")); + } catch(ISE $ex) { + $this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted_or_too_large")); + } if($_FILES["_vid_attachment"]["error"] === UPLOAD_ERR_OK) { $video = Video::fastMake($this->user->id, $this->postParam("text"), $_FILES["_vid_attachment"], $anon); } - } catch(\DomainException $ex) { - $this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted")); - } catch(ISE $ex) { - $this->flashFail("err", tr("failed_to_publish_post"), tr("media_file_corrupted_or_too_large")); } if(empty($this->postParam("text")) && !$photo && !$video)