From: Andrew Dolgov Date: Sat, 2 Dec 2017 09:03:39 +0000 (+0300) Subject: pref-system: PDO X-Git-Tag: 17.12~55 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=93ca6c95b8130c91856380d55c8125bbc9cc82e6;p=tt-rss.git pref-system: PDO --- 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) {