diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index c3765d82..13766acb 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -31,7 +31,7 @@ final class UserPresenter extends OpenVKPresenter { $user = $this->users->get($id); if(!$user || $user->isDeleted()) - $this->notFound(); + $this->template->_template = "User/deleted.xml"; else { if($user->getShortCode()) if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) !== "/" . $user->getShortCode()) diff --git a/Web/Presenters/templates/User/deleted.xml b/Web/Presenters/templates/User/deleted.xml new file mode 100644 index 00000000..7a9fa80c --- /dev/null +++ b/Web/Presenters/templates/User/deleted.xml @@ -0,0 +1,14 @@ +{extends "../@layout.xml"} +{block title}{_information}{/block} + +{block header} + {_information} +{/block} + +{block content} +
+ + {_profile_not_found_text} + +
+{/block} diff --git a/locales/en.strings b/locales/en.strings index ffbfa11b..bb9d16cb 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -800,6 +800,7 @@ "profile_changed" = "Profile changed"; "profile_changed_comment" = "Your active profile has been changed."; "profile_not_found" = "User is not found."; +"profile_not_found_text" = "This profile has either been deleted or not been created yet."; "suspicious_registration_attempt" = "Suspicious registration attempt"; "suspicious_registration_attempt_comment" = "You tried to register from a suspicious location."; diff --git a/locales/ru.strings b/locales/ru.strings index df897f18..c3c22624 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -843,6 +843,7 @@ "profile_changed" = "Профиль изменён"; "profile_changed_comment" = "Ваш активный профиль был изменён."; "profile_not_found" = "Пользователь не найден."; +"profile_not_found_text" = "Страница удалена либо ещё не создана."; "suspicious_registration_attempt" = "Подозрительная попытка регистрации"; "suspicious_registration_attempt_comment" = "Вы пытались зарегистрироваться из подозрительного места.";