From 93ca6c95b8130c91856380d55c8125bbc9cc82e6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 2 Dec 2017 12:03:39 +0300 Subject: [PATCH] pref-system: PDO --- classes/pref/system.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/pref/system.php b/classes/pref/system.php index 56c0fec9..2099ebb9 100644 --- a/classes/pref/system.php +++ b/classes/pref/system.php @@ -20,7 +20,7 @@ class Pref_System extends Handler_Protected { } function clearLog() { - $this->dbh->query("DELETE FROM ttrss_error_log"); + $this->pdo->query("DELETE FROM ttrss_error_log"); } function index() { @@ -30,7 +30,7 @@ class Pref_System extends Handler_Protected { if (LOG_DESTINATION == "sql") { - $result = $this->dbh->query("SELECT errno, errstr, filename, lineno, + $res = $this->pdo->query("SELECT errno, errstr, filename, lineno, created_at, login, context FROM ttrss_error_log LEFT JOIN ttrss_users ON (owner_uid = ttrss_users.id) ORDER BY ttrss_error_log.id DESC @@ -52,7 +52,7 @@ class Pref_System extends Handler_Protected { ".__("Date")." "; - while ($line = $this->dbh->fetch_assoc($result)) { + while ($line = $res->fetch()) { print ""; foreach ($line as $k => $v) { -- 2.39.5