mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Users: Replace Error 404 for deleted profiles
This commit replaces the 404 error with a new template for deleted/non-existent users. (this commit was backported from profile-removal)
This commit is contained in:
parent
a205dc82b8
commit
dee3942aef
4 changed files with 17 additions and 1 deletions
|
@ -31,7 +31,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
{
|
{
|
||||||
$user = $this->users->get($id);
|
$user = $this->users->get($id);
|
||||||
if(!$user || $user->isDeleted())
|
if(!$user || $user->isDeleted())
|
||||||
$this->notFound();
|
$this->template->_template = "User/deleted.xml";
|
||||||
else {
|
else {
|
||||||
if($user->getShortCode())
|
if($user->getShortCode())
|
||||||
if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) !== "/" . $user->getShortCode())
|
if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) !== "/" . $user->getShortCode())
|
||||||
|
|
14
Web/Presenters/templates/User/deleted.xml
Normal file
14
Web/Presenters/templates/User/deleted.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{extends "../@layout.xml"}
|
||||||
|
{block title}{_information}{/block}
|
||||||
|
|
||||||
|
{block header}
|
||||||
|
{_information}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block content}
|
||||||
|
<center style="background: white;border: #DEDEDE solid 1px;">
|
||||||
|
<span style="color: #707070;margin: 60px 0;display: block;">
|
||||||
|
{_profile_not_found_text}
|
||||||
|
</span>
|
||||||
|
</center>
|
||||||
|
{/block}
|
|
@ -800,6 +800,7 @@
|
||||||
"profile_changed" = "Profile changed";
|
"profile_changed" = "Profile changed";
|
||||||
"profile_changed_comment" = "Your active profile has been changed.";
|
"profile_changed_comment" = "Your active profile has been changed.";
|
||||||
"profile_not_found" = "User is not found.";
|
"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" = "Suspicious registration attempt";
|
||||||
"suspicious_registration_attempt_comment" = "You tried to register from a suspicious location.";
|
"suspicious_registration_attempt_comment" = "You tried to register from a suspicious location.";
|
||||||
|
|
|
@ -843,6 +843,7 @@
|
||||||
"profile_changed" = "Профиль изменён";
|
"profile_changed" = "Профиль изменён";
|
||||||
"profile_changed_comment" = "Ваш активный профиль был изменён.";
|
"profile_changed_comment" = "Ваш активный профиль был изменён.";
|
||||||
"profile_not_found" = "Пользователь не найден.";
|
"profile_not_found" = "Пользователь не найден.";
|
||||||
|
"profile_not_found_text" = "Страница удалена либо ещё не создана.";
|
||||||
|
|
||||||
"suspicious_registration_attempt" = "Подозрительная попытка регистрации";
|
"suspicious_registration_attempt" = "Подозрительная попытка регистрации";
|
||||||
"suspicious_registration_attempt_comment" = "Вы пытались зарегистрироваться из подозрительного места.";
|
"suspicious_registration_attempt_comment" = "Вы пытались зарегистрироваться из подозрительного места.";
|
||||||
|
|
Loading…
Reference in a new issue