From dc8bd8a640ee7d4508212e12823fc9094258e819 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 10 Feb 2017 14:57:25 +0300 Subject: [PATCH] add some print_checkbox/print_button calls; rename some plugin preference pane titles --- include/functions.php | 5 +++-- plugins/af_psql_trgm/init.php | 12 ++++-------- plugins/af_readability/init.php | 12 ++++-------- plugins/af_redditimgur/init.php | 21 ++++++--------------- plugins/af_zz_imgproxy/init.php | 2 +- 5 files changed, 18 insertions(+), 34 deletions(-) diff --git a/include/functions.php b/include/functions.php index 07277961..cdd783cd 100644 --- a/include/functions.php +++ b/include/functions.php @@ -667,10 +667,11 @@ print ""; } - function print_checkbox($id, $checked, $attributes = "") { + function print_checkbox($id, $checked, $value = "", $attributes = "") { $checked_str = $checked ? "checked" : ""; + $value_str = $value ? "value=\"$value\"" : ""; - print ""; + print ""; } function print_button($type, $value, $attributes = "") { diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index 63c52bf2..8c92be1a 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -134,8 +134,6 @@ class Af_Psql_Trgm extends Plugin { if (!$similarity) $similarity = '0.75'; if (!$min_title_length) $min_title_length = '32'; - $enable_globally_checked = $enable_globally ? "checked" : ""; - print "
"; print "