From d9c85e0f112034ca3e3f4d34213f6dcccf9d54e1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Apr 2013 20:12:14 +0400 Subject: classes: use OO DB interface --- classes/dlg.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'classes/dlg.php') diff --git a/classes/dlg.php b/classes/dlg.php index 5e14690c4..cfa960d9a 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -6,7 +6,7 @@ class Dlg extends Handler_Protected { if (parent::before($method)) { header("Content-Type: text/html"); # required for iframe - $this->param = db_escape_string($_REQUEST["param"]); + $this->param = $this->dbh->escape_string($_REQUEST["param"]); return true; } return false; @@ -18,7 +18,7 @@ class Dlg extends Handler_Protected { print "
"; $owner_uid = $_SESSION["uid"]; - db_query("BEGIN"); + $this->dbh->query("BEGIN"); print ""; print "
"; @@ -106,11 +106,11 @@ class Dlg extends Handler_Protected { FROM ttrss_tags WHERE owner_uid = ".$_SESSION["uid"]." GROUP BY tag_name ORDER BY count DESC LIMIT 50"; - $result = db_query($query); + $result = $this->dbh->query($query); $tags = array(); - while ($line = db_fetch_assoc($result)) { + while ($line = $this->dbh->fetch_assoc($result)) { $tags[$line["tag_name"]] = $line["count"]; } @@ -171,10 +171,10 @@ class Dlg extends Handler_Protected { print "