From 84c28a934a608ed006871cf8c0cafe8245ede18b Mon Sep 17 00:00:00 2001 From: phamt Date: Wed, 13 Apr 2011 11:48:34 +0000 Subject: [PATCH] Fixed login bug related to docmd() options. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9297 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-UI/lib/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-UI/lib/functions.php b/xCAT-UI/lib/functions.php index c0aa66b41..498e671c9 100644 --- a/xCAT-UI/lib/functions.php +++ b/xCAT-UI/lib/functions.php @@ -65,14 +65,14 @@ function submit_request($req, $skipVerify, $opts_array){ // Determine whether to flush output or not $flush = false; - if (in_array("flush", $opts_array)) { + if ($opts_array && in_array("flush", $opts_array)) { $flush = true; } // Determine how to handle the flush output // You can specify a function name, in place of TBD, to handle the flush output $flush_format = ""; - if (in_array("flush-format=TBD", $opts_array)) { + if ($opts_array && in_array("flush-format=TBD", $opts_array)) { $flush_format = "TBD"; } @@ -255,7 +255,7 @@ function is_logged() { function isAuthenticated() { if (is_logged()) { if ($_SESSION["xcatpassvalid"] != 1) { - $testcred = docmd("authcheck", "", NULL); + $testcred = docmd("authcheck", "", NULL, NULL); if (isset($testcred->{'xcatresponse'}->{'data'})) { $result = "".$testcred->{'xcatresponse'}->{'data'}; if (is_numeric(strpos("Authenticated",$result))) {