From: Andrew Dolgov Date: Sun, 3 Dec 2017 07:43:19 +0000 (+0300) Subject: plugins/note: use PDO X-Git-Tag: 17.12~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ef2438a5032fcbbd1e7534397b4f06de47a87a0c;p=tt-rss.git plugins/note: use PDO --- 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']]); + + 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 "