From 75121c41ec3021e630b7de639861ae50ed419a1f Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 6 Jul 2008 21:17:16 +0000 Subject: [PATCH] Optional default value for input_num() --- includes/ui/ui_input.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 74437698..b775ede0 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -67,10 +67,10 @@ function simple_page_mode($numeric_id = true) // // Read numeric value from user formatted input // -function input_num($postname=null) +function input_num($postname=null, $dflt=null) { if (!isset($_POST[$postname])) - return null; + return $dflt; return user_numeric($_POST[$postname]); } -- 2.30.2