From 1271407eea5e4d98968b701025630c03d66ce5d1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 1 Dec 2017 18:57:34 +0300 Subject: public: partial conversion to PDO, misc fixes --- include/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/functions.php b/include/functions.php index be8cba41f..8d25457c9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2043,10 +2043,12 @@ if (!$owner_uid) $owner_uid = $_SESSION["uid"]; + $is_cat = bool_to_sql_bool($is_cat); + $pdo = Db::pdo(); - $sth = $dbh->prepare("SELECT access_key FROM ttrss_access_keys - WHERE feed_id = ? AND is_cat = ? + $sth = $pdo->prepare("SELECT access_key FROM ttrss_access_keys + WHERE feed_id = ? AND is_cat = ? AND owner_uid = ?"); $sth->execute([$feed_id, $is_cat, $owner_uid]); -- cgit v1.2.3-54-g00ecf