mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 00:42:43 +00:00
Simplify get_name even further
This commit is contained in:
parent
25b147de9a
commit
ee53e992a4
@ -221,14 +221,12 @@ class Page {
|
|||||||
}
|
}
|
||||||
if (array_key_exists($uuid, $this->uuid_name_cache)) return $this->uuid_name_cache[$uuid];
|
if (array_key_exists($uuid, $this->uuid_name_cache)) return $this->uuid_name_cache[$uuid];
|
||||||
|
|
||||||
$history = $this->settings->table['history'];
|
|
||||||
$stmt = $this->conn->prepare("SELECT name FROM $history WHERE uuid=? ORDER BY date DESC LIMIT 1");
|
|
||||||
$result = null;
|
$result = null;
|
||||||
|
$history = $this->settings->table['history'];
|
||||||
|
|
||||||
|
$stmt = $this->conn->prepare("SELECT name FROM $history WHERE uuid=? ORDER BY date DESC LIMIT 1");
|
||||||
if ($stmt->execute(array($uuid)) && $row = $stmt->fetch()) {
|
if ($stmt->execute(array($uuid)) && $row = $stmt->fetch()) {
|
||||||
$name = $row['name'];
|
$result = $row['name'];
|
||||||
$this->uuid_name_cache[$uuid] = $name;
|
|
||||||
$result = $name;
|
|
||||||
}
|
}
|
||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user