summaryrefslogtreecommitdiff
path: root/plugins/note
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-05-07 15:36:14 +0400
committerAndrew Dolgov <[email protected]>2013-05-07 15:36:14 +0400
commit82076ce53113be9cc053f8740356e7e1b81e5643 (patch)
tree5eba36805f593ec7dd0aad671b5bcca0ae01cf53 /plugins/note
parent66af65f14b4f3c670bb3f9ca7b1c80081f9281d1 (diff)
parent23923fb29b345c1eea5b70a6df4d30395425bf37 (diff)
Merge branch 'master' into css-feedtree-counter
Conflicts: tt-rss.css
Diffstat (limited to 'plugins/note')
-rw-r--r--plugins/note/init.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/note/init.php b/plugins/note/init.php
index 7e8cfb57f..2a32961fc 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -1,6 +1,5 @@
<?php
class Note extends Plugin {
- private $link;
private $host;
function about() {
@@ -10,7 +9,6 @@ class Note extends Plugin {
}
function init($host) {
- $this->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);
@@ -70,5 +68,9 @@ class Note extends Plugin {
"raw_length" => mb_strlen($note)));
}
+ function api_version() {
+ return 2;
+ }
+
}
?>