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 65cdf30e..354591b7 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']]); - $note = db_fetch_result($result, 0, "note"); + if ($row = $sth->fetch()) { - print_hidden("id", "$param"); - print_hidden("op", "pluginhandler"); - print_hidden("method", "setNote"); - print_hidden("plugin", "note"); + $note = $row['note']; - print "
"; - print ""; - print "
"; + print_hidden("id", "$param"); + print_hidden("op", "pluginhandler"); + print_hidden("method", "setNote"); + print_hidden("plugin", "note"); + + print "
"; + print ""; + print "
"; + + } print "
"; print "