mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Simplify/optimize get_name()
This commit is contained in:
parent
2335143b34
commit
d0417bf115
@ -293,10 +293,8 @@ class Page {
|
||||
* @return null|string
|
||||
*/
|
||||
function get_name($uuid) {
|
||||
if ($uuid === null || $uuid === "" || strrpos($uuid, "#", -strlen($uuid)) !== false) return null;
|
||||
if (in_array($uuid, $this->settings->console_aliases)) {
|
||||
return $this->settings->console_name;
|
||||
}
|
||||
if ($uuid === null || $uuid === "" || $uuid[0] === '#') return null;
|
||||
if (in_array($uuid, $this->settings->console_aliases)) return $this->settings->console_name;
|
||||
if (array_key_exists($uuid, $this->uuid_name_cache)) return $this->uuid_name_cache[$uuid];
|
||||
|
||||
$result = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user