mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Allow __transNames to be empty
This commit is contained in:
parent
3c632f3910
commit
55ec291650
1 changed files with 4 additions and 2 deletions
|
@ -148,7 +148,8 @@ class User extends RowModel
|
|||
function getFirstName(bool $pristine = false): string
|
||||
{
|
||||
$name = ($this->isDeleted() && !$this->isDeactivated() ? "DELETED" : mb_convert_case($this->getRecord()->first_name, MB_CASE_TITLE));
|
||||
if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine)
|
||||
$tsn = tr("__transNames");
|
||||
if(( $tsn !== "@__transNames" && !empty($tsn) ) && !$pristine)
|
||||
return mb_convert_case(transliterator_transliterate($ts, $name), MB_CASE_TITLE);
|
||||
else
|
||||
return $name;
|
||||
|
@ -157,7 +158,8 @@ class User extends RowModel
|
|||
function getLastName(bool $pristine = false): string
|
||||
{
|
||||
$name = ($this->isDeleted() && !$this->isDeactivated() ? "DELETED" : mb_convert_case($this->getRecord()->last_name, MB_CASE_TITLE));
|
||||
if((($ts = tr("__transNames")) !== "@__transNames") && !$pristine)
|
||||
$tsn = tr("__transNames");
|
||||
if(( $tsn !== "@__transNames" && !empty($tsn) ) && !$pristine)
|
||||
return mb_convert_case(transliterator_transliterate($ts, $name), MB_CASE_TITLE);
|
||||
else
|
||||
return $name;
|
||||
|
|
Loading…
Reference in a new issue