Fixed get_post() support for numeric fields.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 10 Jan 2019 19:04:20 +0000 (20:04 +0100)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 10 Jan 2019 19:04:20 +0000 (20:04 +0100)
admin/display_prefs.php
includes/ui/ui_controls.inc

index 243ddea965f849cf847a69930e8c4d6572f0bd19..6d7e06bf236d12b139d8b8eb8dbdeb82fd77743a 100644 (file)
@@ -40,7 +40,7 @@ if (isset($_POST['setprefs']))
                        array('prices_dec', 'qty_dec', 'rates_dec', 'percent_dec',
                        'date_format', 'date_sep', 'tho_sep', 'dec_sep', 'print_profile', 
                        'theme', 'page_size', 'language', 'startup_tab',
-                       'query_size' => 10.0, 'transaction_days' => 30, 'save_report_selections' => 0,
+                       'query_size' => 10, 'transaction_days' => 30, 'save_report_selections' => 0,
                        'def_print_destination' => 0, 'def_print_orientation' => 0)));
 
                set_user_prefs(check_value(
index 52f417bb486f92f253faa84594079cda1a71759b..c2dbae05a715440633230fafe231d2850d931d24 100644 (file)
@@ -22,7 +22,7 @@ function get_post($name, $dflt='')
                $ret = array();
                foreach($name as $key => $dflt)
                        if (!is_numeric($key)) {
-                               $ret[$key] = is_float($dflt) ? input_num($key, $dflt) : get_post($key, $dflt);
+                               $ret[$key] = is_numeric($dflt) ? input_num($key, $dflt) : get_post($key, $dflt);
                        } else {
                                $ret[$dflt] = get_post($dflt, null);
                        }