diff --git a/web/CXM_web_arg_utils.anubis b/web/CXM_web_arg_utils.anubis index 3c37777..e45a318 100644 --- a/web/CXM_web_arg_utils.anubis +++ b/web/CXM_web_arg_utils.anubis @@ -295,15 +295,23 @@ public define Maybe(Bool) List(Web_arg) lwa, String arg_name ) = +// println("get_mb_Bool "+arg_name); if web_arg_value(lwa, arg_name) is { not_found then if web_arg_value(lwa, "~"+arg_name) is { - not_found then failure, - found(_) then success(false) + not_found then + //println("failure"); + failure, + found(_) then + //println("success(false)"); + success(false) }, - found(_) then success(true) + found(value) then + with return_v = to_Bool(value), +// println("value = '"+value+"' result = "+to_String(return_v)+" success("+to_String(return_v)+")"); + success(return_v) }. public define Bool @@ -312,10 +320,14 @@ public define Bool List(Web_arg) lwa, String arg_name ) = +// println("get_Bool "+arg_name); if web_arg_value(lwa, arg_name) is { not_found then false, - found(value) then to_Bool(value) + found(value) then + with return_v = to_Bool(value), +// println("value = '"+value+"' result = "+to_String(return_v)); + return_v }. public define Bool @@ -325,10 +337,17 @@ public define Bool String arg_name, Bool default_value ) = +// println("get_Bool with default ["+arg_name+"] default = "+to_String(default_value)); if web_arg_value(lwa, arg_name) is { - not_found then default_value, - found(_) then true + not_found then + //println("return default_value"); + default_value, + found(value) then + with return_v = to_Bool(value), + //println("value = '"+value+"' result = "+to_String(return_v)); + return_v + //true }. public define Maybe(Bool) -- libgit2 0.21.4