summaryrefslogtreecommitdiff
path: root/plugins/note/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/note/init.php')
-rw-r--r--plugins/note/init.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/note/init.php b/plugins/note/init.php
index 560796a69..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);
@@ -22,7 +20,7 @@ class Note extends Plugin {
function hook_article_button($line) {
- return "<img src=\"".theme_image($this->link, "plugins/note/note.png")."\"
+ return "<img src=\"plugins/note/note.png\"
style=\"cursor : pointer\" style=\"cursor : pointer\"
onclick=\"editArticleNote(".$line["id"].")\"
class='tagsPic' title='".__('Edit article note')."'>";
@@ -31,7 +29,7 @@ class Note extends Plugin {
function edit() {
$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");
@@ -61,7 +59,7 @@ class Note extends Plugin {
$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;
+ }
+
}
?>