Commit a15f8ef2728461e63b7d597a50484d0290c46635

Authored by totoro
1 parent dcdc3e88

add get_DB_id with default value which can be use if the db_id is not found

Showing 1 changed file with 14 additions and 0 deletions   Show diff stats
web/CXM_web_arg_utils.anubis
@@ -123,6 +123,20 @@ public define DB_id @@ -123,6 +123,20 @@ public define DB_id
123 get_DB_id 123 get_DB_id
124 ( 124 (
125 List(Web_arg) lwa, 125 List(Web_arg) lwa,
  126 + String arg_name,
  127 + DB_id defaut_value
  128 + ) =
  129 + if get_mb_DB_id(lwa, arg_name) is
  130 + {
  131 + failure then defaut_value,
  132 + success(value) then value
  133 + }
  134 +.
  135 +
  136 +public define DB_id
  137 + get_DB_id
  138 + (
  139 + List(Web_arg) lwa,
126 String arg_name 140 String arg_name
127 ) = 141 ) =
128 if get_mb_DB_id(lwa, arg_name) is 142 if get_mb_DB_id(lwa, arg_name) is