X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=plugins%2Fnote%2Finit.php;h=a5396e5a43e98dd0654e2fefc21dcf3d3dd37ff3;hb=6322ac79a020ab584d412d782d62b2ee77d7c6cf;hp=7e8cfb57ffefd1327beaaed825423e2718a40983;hpb=aca75cb5cb323535099c7aef46a78ea3cec082f2;p=tt-rss.git diff --git a/plugins/note/init.php b/plugins/note/init.php index 7e8cfb57..a5396e5a 100644 --- a/plugins/note/init.php +++ b/plugins/note/init.php @@ -1,6 +1,5 @@ link = $host->get_link(); $this->host = $host; $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); @@ -29,9 +27,9 @@ class Note extends Plugin { } function edit() { - $param = db_escape_string($this->link, $_REQUEST['param']); + $param = db_escape_string( $_REQUEST['param']); - $result = db_query($this->link, "SELECT note FROM ttrss_user_entries WHERE + $result = db_query( "SELECT note FROM ttrss_user_entries WHERE ref_id = '$param' AND owner_uid = " . $_SESSION['uid']); $note = db_fetch_result($result, 0, "note"); @@ -58,10 +56,10 @@ class Note extends Plugin { } function setNote() { - $id = db_escape_string($this->link, $_REQUEST["id"]); - $note = trim(strip_tags(db_escape_string($this->link, $_REQUEST["note"]))); + $id = db_escape_string( $_REQUEST["id"]); + $note = trim(strip_tags(db_escape_string( $_REQUEST["note"]))); - db_query($this->link, "UPDATE ttrss_user_entries SET note = '$note' + db_query( "UPDATE ttrss_user_entries SET note = '$note' WHERE ref_id = '$id' AND owner_uid = " . $_SESSION["uid"]); $formatted_note = format_article_note($id, $note);