From 726f54ce9e0476cbf3c82e0a29ca13ab432e0b7e Mon Sep 17 00:00:00 2001 From: "Felix J. Ogris" Date: Fri, 4 Nov 2022 20:19:41 +0100 Subject: [PATCH] typos --- lib/Data/AbstractData.php | 2 +- lib/Data/Database.php | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php index eddab09..b28fd53 100644 --- a/lib/Data/AbstractData.php +++ b/lib/Data/AbstractData.php @@ -108,7 +108,7 @@ abstract class AbstractData if ($namespace === 'traffic_limiter') { foreach ($this->_last_cache as $key => $last_submission) { if ($last_submission <= $time) { - unset($thi->_last_cache[$key]); + unset($this->_last_cache[$key]); } } } diff --git a/lib/Data/Database.php b/lib/Data/Database.php index f431858..5502573 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -530,16 +530,9 @@ class Database extends AbstractData */ public function getAllPastes() { - $pastes = array(); - $rows = $this->_select( - 'SELECT "dataid" FROM "' . $this->_sanitizeIdentifier('paste') . '"', - array() - ); - if (is_array($rows) && count($rows)) { - foreach ($rows as $row) { - $pastes[] = $row['dataid']; - } - } + $pastes = $this->_db->_query( + 'SELECT "dataid" FROM "' . $this->_sanitizeIdentifier('paste') . '"' + )->fetchAll(PDO::FETCH_COLUMN, 0); return $pastes; }