From ef2438a5032fcbbd1e7534397b4f06de47a87a0c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Dec 2017 10:43:19 +0300 Subject: [PATCH] plugins/note: use PDO --- plugins/note/init.php | 44 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/plugins/note/init.php b/plugins/note/init.php index 65cdf30e4..354591b75 100644 --- a/plugins/note/init.php +++ b/plugins/note/init.php @@ -1,5 +1,7 @@ pdo->prepare("SELECT note FROM ttrss_user_entries WHERE + ref_id = ? AND owner_uid = ?"); + $sth->execute([$param, $_SESSION['uid']]); + + if ($row = $sth->fetch()) { - $result = db_query("SELECT note FROM ttrss_user_entries WHERE - ref_id = '$param' AND owner_uid = " . $_SESSION['uid']); + $note = $row['note']; - $note = db_fetch_result($result, 0, "note"); + print_hidden("id", "$param"); + print_hidden("op", "pluginhandler"); + print_hidden("method", "setNote"); + print_hidden("plugin", "note"); - print_hidden("id", "$param"); - print_hidden("op", "pluginhandler"); - print_hidden("method", "setNote"); - print_hidden("plugin", "note"); + print "
"; + print ""; + print "
"; - print "
"; - print ""; - print "
"; + } print "
"; print "