X-Git-Url: http://git.pjr.cc/?p=configmanager.git;a=blobdiff_plain;f=lib%2Fwww.php;h=dc3a105ce396b071c97a8c43516158dc99f51dc4;hp=91ce2c29c9aa80f667f90a942c7b922ed17d4179;hb=5882044ae8cee1579bb1e5582497ae8b3b9e85c5;hpb=16e3be6e5ed75359a4271cc94f80ca656cefd4b2 diff --git a/lib/www.php b/lib/www.php index 91ce2c2..dc3a105 100644 --- a/lib/www.php +++ b/lib/www.php @@ -191,7 +191,25 @@ function www_updateHost() $func = $HOST_TYPE["$htype"]["getconfig"]; $logdets = unserialize(base64_decode($hconfig)); - $conf = $func($hip, $logdets["username"], $logdets["password"], $logdets["enable"]); + // now check enable, username and password bits for completeness + $need_user = false; + $need_pass = false; + $need_enable = false; + + // this aint the right way. + if($logdets["username"] == "" && $_REQUEST["username"] == "") { + // we need a user + $need_user = true; + } + if($logdets["password"] == "" && $_REQUEST["password"] == "") { + // we need a user + $need_pass = true; + } + if($logdets["enable"] == "" && $_REQUEST["enable"] == "" && $HOST_TYPE["$htype"]["needsenable"]) { + $need_enable = true; + } + + $conf = $func($hip, $act_user, $act_pass, $act_enable); // function db_getMaxValue($tablename, $column, $columnsel="", $wheresel="") $oldconf_rid = db_getMaxValue("configs", "configs_id", "hostip", "$hip");