This commit is contained in:
Felix J. Ogris 2022-11-04 20:19:41 +01:00
parent bde5802a3a
commit 726f54ce9e
2 changed files with 4 additions and 11 deletions

View File

@ -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]);
}
}
}

View File

@ -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;
}