From 8f8675a26abf86ff6a77bc750096b77491d71213 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 12 Feb 2021 14:31:36 +0300 Subject: * filters: remove duplicate code, overall cleanup * check if some tres exist before trying to reload them --- include/controls.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/controls.php') diff --git a/include/controls.php b/include/controls.php index 78a5feb77..8f49e99c5 100755 --- a/include/controls.php +++ b/include/controls.php @@ -35,15 +35,23 @@ function print_select_hash($id, $default, $values, $attributes = "", $name = "") print ""; } +function format_hidden($name, $value) { + return ""; +} + function print_hidden($name, $value) { - print ""; + print format_hidden($name, $value); } -function print_checkbox($id, $checked, $value = "", $attributes = "") { +function format_checkbox($id, $checked, $value = "", $attributes = "") { $checked_str = $checked ? "checked" : ""; $value_str = $value ? "value=\"$value\"" : ""; - print ""; + return ""; +} + +function print_checkbox($id, $checked, $value = "", $attributes = "") { + print format_checkbox($id, $checked, $value, $attributes); } function print_button($type, $value, $attributes = "") { -- cgit v1.2.3-54-g00ecf