mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
User: Now the User's page can be marked as Deceased. And now the user can be Incognito (at least, admins)
To mark the page as Deceased, type in field in Database. To be Incognito, type in field. Specially for deceased drbream
This commit is contained in:
parent
348a4d127a
commit
7f1a5f2354
5 changed files with 33 additions and 3 deletions
|
@ -683,6 +683,28 @@ class User extends RowModel
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 0 - Default status
|
||||
* 1 - Incognito online status
|
||||
* 2 - Page of a dead person
|
||||
*/
|
||||
function onlineStatus(): int
|
||||
{
|
||||
switch ($this->getRecord()->online) {
|
||||
case 1:
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
return 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
use Traits\TSubscribable;
|
||||
}
|
||||
|
|
|
@ -196,10 +196,13 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
exit;
|
||||
}
|
||||
|
||||
if ($this->user->identity->onlineStatus() == 0) {
|
||||
$this->user->identity->setOnline(time());
|
||||
$this->user->identity->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
setlocale(LC_TIME, ...(explode(";", tr("__locale"))));
|
||||
|
||||
parent::onStartup();
|
||||
|
|
|
@ -40,6 +40,9 @@
|
|||
<span>{_was_online} {$user->getOnline()}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div n:if="$user->onlineStatus() == 2" style="float:right;">
|
||||
<span><b>{_deceased_person}</b></span>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block content}
|
||||
|
|
|
@ -36,13 +36,14 @@
|
|||
"online" = "Online";
|
||||
"was_online" = "was online";
|
||||
"was_online_m" = "was online";
|
||||
%{ For male and femail %}
|
||||
%{ For male and female %}
|
||||
|
||||
"was_online_f" = "was online";
|
||||
"all_title" = "All";
|
||||
"information" = "Information";
|
||||
"status" = "Status";
|
||||
"no_information_provided" = "No information provided.";
|
||||
"deceased_person" = "Deceased person";
|
||||
|
||||
"relationship" = "Relationship";
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
"information" = "Информация";
|
||||
"status" = "Статус";
|
||||
"no_information_provided" = "Информация отсутствует.";
|
||||
"deceased_person" = "Страница покойного человека";
|
||||
|
||||
"relationship" = "Семейное положение";
|
||||
|
||||
|
|
Loading…
Reference in a new issue