}
function edit() {
- $param = db_escape_string( $_REQUEST['param']);
+ $param = db_escape_string($_REQUEST['param']);
- $result = db_query( "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");
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"$param\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pluginhandler\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"setNote\">";
- print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"plugin\" value=\"note\">";
+ print_hidden("id", "$param");
+ print_hidden("op", "pluginhandler");
+ print_hidden("method", "setNote");
+ print_hidden("plugin", "note");
print "<table width='100%'><tr><td>";
print "<textarea dojoType=\"dijit.form.SimpleTextarea\"
- style='font-size : 12px; width : 100%; height: 100px;'
+ style='font-size : 12px; width : 98%; height: 100px;'
placeHolder='body#ttrssMain { font-size : 14px; };'
name='note'>$note</textarea>";
print "</td></tr></table>";
}
function setNote() {
- $id = db_escape_string( $_REQUEST["id"]);
- $note = trim(strip_tags(db_escape_string( $_REQUEST["note"])));
+ $id = db_escape_string($_REQUEST["id"]);
+ $note = trim(strip_tags(db_escape_string($_REQUEST["note"])));
- db_query( "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);
"raw_length" => mb_strlen($note)));
}
+ function api_version() {
+ return 2;
+ }
+
}
?>