From 328118d12ef6ba98650da8e1a1a505e080a58adf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 10 Feb 2017 14:36:21 +0300 Subject: [PATCH] use print_hidden() for hidden dojo form fields --- classes/article.php | 6 +++--- classes/feeds.php | 8 ++++---- classes/pref/feeds.php | 16 ++++++++-------- classes/pref/filters.php | 14 +++++++------- classes/pref/labels.php | 6 +++--- classes/pref/prefs.php | 32 ++++++++++++++++---------------- classes/pref/users.php | 10 +++++----- plugins/af_psql_trgm/init.php | 6 +++--- plugins/af_readability/init.php | 6 +++--- plugins/af_redditimgur/init.php | 6 +++--- plugins/instances/init.php | 10 +++++----- plugins/mail/init.php | 16 ++++++++-------- plugins/note/init.php | 8 ++++---- plugins/nsfw/init.php | 6 +++--- 14 files changed, 75 insertions(+), 75 deletions(-) diff --git a/classes/article.php b/classes/article.php index 46e9bb79..4126843a 100644 --- a/classes/article.php +++ b/classes/article.php @@ -202,9 +202,9 @@ class Article extends Handler_Protected { $tags_str = join(", ", $tags); - print ""; - print ""; - print ""; + print_hidden("id", "$param"); + print_hidden("op", "article"); + print_hidden("method", "setArticleTags"); print "
"; diff --git a/classes/feeds.php b/classes/feeds.php index 1375f0c3..a4110938 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -1027,8 +1027,8 @@ class Feeds extends Handler_Protected { } function quickAddFeed() { - print ""; - print ""; + print_hidden("op", "rpc"); + print_hidden("method", "addfeed"); print ""; @@ -1111,8 +1111,8 @@ class Feeds extends Handler_Protected { $browser_search = $this->dbh->escape_string($_REQUEST["search"]); - print ""; - print ""; + print_hidden("op", "rpc"); + print_hidden("method", "updateFeedBrowser"); print "
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index bac859d7..8c37b430 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -548,9 +548,9 @@ class Pref_Feeds extends Handler_Protected { $title = htmlspecialchars($this->dbh->fetch_result($result, 0, "title")); - print ""; - print ""; - print ""; + print_hidden("id", "$feed_id"); + print_hidden("op", "pref-feeds"); + print_hidden("method", "editSave"); print "
".__("Feed")."
"; print "
"; @@ -816,9 +816,9 @@ class Pref_Feeds extends Handler_Protected { print "

"; - print ""; - print ""; - print ""; + print_hidden("ids", "$feed_ids"); + print_hidden("op", "pref-feeds"); + print_hidden("method", "batchEditSave"); print "

".__("Feed")."
"; print "
"; @@ -1812,8 +1812,8 @@ class Pref_Feeds extends Handler_Protected { } function batchSubscribe() { - print ""; - print ""; + print_hidden("op", "pref-feeds"); + print_hidden("method", "batchaddfeeds"); print "
".__("Add one valid RSS feed per line (no feed detection is done)")." diff --git a/classes/pref/filters.php b/classes/pref/filters.php index b7c286ec..5629f530 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -340,10 +340,10 @@ class Pref_Filters extends Handler_Protected { print "
"; - print ""; - print ""; - print ""; - print ""; + print_hidden("op", "pref-filters"); + print_hidden("id", "$filter_id"); + print_hidden("method", "editSave"); + print_hidden("csrf_token", $_SESSION['csrf_token']); print "
".__("Caption")."
"; @@ -816,9 +816,9 @@ class Pref_Filters extends Handler_Protected { print ""; - print ""; - print ""; - print ""; + print_hidden("op", "pref-filters"); + print_hidden("method", "add"); + print_hidden("csrf_token", $_SESSION['csrf_token']); print "
".__("Caption")."
"; diff --git a/classes/pref/labels.php b/classes/pref/labels.php index 458e4f88..b127ce95 100644 --- a/classes/pref/labels.php +++ b/classes/pref/labels.php @@ -15,9 +15,9 @@ class Pref_Labels extends Handler_Protected { $line = $this->dbh->fetch_assoc($result); - print ""; - print ""; - print ""; + print_hidden("id", "$label_id"); + print_hidden("op", "pref-labels"); + print_hidden("method", "save"); print "
".__("Caption")."
"; diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 18ffcc72..9a7ab55a 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -226,8 +226,8 @@ class Pref_Prefs extends Handler_Protected { print "
"; - print ""; - print ""; + print_hidden("op", "pref-prefs"); + print_hidden("method", "changeemail"); print "

"; @@ -305,8 +305,8 @@ class Pref_Prefs extends Handler_Protected { print "

"; - print ""; - print ""; + print_hidden("op", "pref-prefs"); + print_hidden("method", "changepassword"); print "

"; @@ -351,8 +351,8 @@ class Pref_Prefs extends Handler_Protected { print ""; - print ""; - print ""; + print_hidden("op", "pref-prefs"); + print_hidden("method", "otpdisable"); print "

"; @@ -371,8 +371,8 @@ class Pref_Prefs extends Handler_Protected { print ""; - print ""; - print ""; + print_hidden("op", "pref-prefs"); + print_hidden("method", "otpenable"); print ""; - print ""; - print ""; + print_hidden("op", "pref-prefs"); + print_hidden("method", "setplugins"); print ""; @@ -975,9 +975,9 @@ class Pref_Prefs extends Handler_Protected { print_notice(T_sprintf("You can override colors, fonts and layout of your currently selected theme with custom CSS declarations here. This file can be used as a baseline.", "css/tt-rss.css")); - print ""; - print ""; - print ""; + print_hidden("op", "rpc"); + print_hidden("method", "setpref"); + print_hidden("key", "USER_STYLESHEET"); print "
"; print "