diff --git a/xCAT-web/lib/functions.php b/xCAT-web/lib/functions.php index 5f774599c..b7f54d472 100644 --- a/xCAT-web/lib/functions.php +++ b/xCAT-web/lib/functions.php @@ -252,7 +252,7 @@ function doTabrestore($tab, & $data){ $usernode->addChild('username',$_SESSION["username"]); $usernode->addChild('password',getpassword()); foreach($data as $line){ - foreach ($line as &$f) { if (!empty($f) && !preg_match('/^".*"$/', $f)) { $f = '"'.$f.'"'; } } + foreach ($line as &$f) { if (!empty($f) && !ereg("^#", $f) && !preg_match('/^".*"$/', $f)) { $f = '"'.$f.'"'; } } // Combine the elements of the array, but have to handle sparse arrays ksort($line, SORT_NUMERIC); diff --git a/xCAT-web/lib/phpinfo.php b/xCAT-web/lib/phpinfo.php index d76f391b3..87f26f583 100644 --- a/xCAT-web/lib/phpinfo.php +++ b/xCAT-web/lib/phpinfo.php @@ -11,6 +11,8 @@ echo "
\n"; //insertLogin(); dumpGlobals(); +echo ''; print_r($_SESSION['editable-hosts']); echo "
\n"; +//foreach ($_SESSION['editable-deps'] as $key => $val) { trace("$key=$val."); } /* $xml = docmd("authcheck","",NULL); diff --git a/xCAT-web/machines/noderangesource.php b/xCAT-web/machines/noderangesource.php index 7d44df97b..249597434 100644 --- a/xCAT-web/machines/noderangesource.php +++ b/xCAT-web/machines/noderangesource.php @@ -27,7 +27,7 @@ require_once "$TOPDIR/jq/jsonwrapper.php"; $numsubgroups=count($rvals->xcatresponse->intersectinggroups); $numnodes=count($rvals->xcatresponse->node); $jdata=array(); - if ($numnodes >= $numsubgroups) { #If there are few enough subgroups to be helpful filters, add them in + if ($numnodes >= $numsubgroups || $root==1) { #If there are few enough subgroups to be helpful filters, add them in foreach ($rvals->xcatresponse->intersectinggroups as $group) { if (! in_array("$group",$parents)) { $jdata[]= array("data"=>"$group",