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.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/note/init.php b/plugins/note/init.php
index f95ba9fa8..65f7e04e9 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -1,9 +1,6 @@
<?php
class Note extends Plugin {
- /* @var PluginHost $host */
- private $host;
-
function about() {
return array(null,
"Adds support for setting article notes",
@@ -11,8 +8,6 @@ class Note extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
@@ -20,13 +15,16 @@ class Note extends Plugin {
return file_get_contents(__DIR__ . "/note.js");
}
+ function get_css() {
+ return file_get_contents(__DIR__ . "/note.css");
+ }
function hook_article_button($line) {
return "<i class='material-icons' onclick=\"Plugins.Note.edit(".$line["id"].")\"
- style='cursor : pointer' title='".__('Edit article note')."'>note</i>";
+ style='cursor : pointer' title=\"".__('Edit article note')."\">note</i>";
}
- function edit() {
+ function edit() : void {
$id = clean($_REQUEST['id']);
$sth = $this->pdo->prepare("SELECT note FROM ttrss_user_entries WHERE
@@ -54,7 +52,7 @@ class Note extends Plugin {
<?php
}
- function setNote() {
+ function setNote() : void {
$id = (int)clean($_REQUEST["id"]);
$note = clean($_REQUEST["note"]);