X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/6ba8e4d31ed75b27167ef4841ba5cc0ba8936716..840f130b4a3ad813c3e1b77b22c76a922fb2426c:/lib/utils.inc.php?ds=inline diff --git a/lib/utils.inc.php b/lib/utils.inc.php index b9f7cf3..b61796c 100644 --- a/lib/utils.inc.php +++ b/lib/utils.inc.php @@ -22,7 +22,54 @@ class Utils { __TITLE__ -
'; + + + +
'; private $footer = '
'; @@ -196,7 +243,7 @@ class Utils { $result; - $url = $CFG->wblistadm_url . "/$method"; + $url = $CFG->wblistadm_url . "$method"; $token = $this->getCSRFPreventionToken($_SESSION['ticket']); $response = $this->RESTCall($url, $data, $_SESSION['cookies'], $token); @@ -207,7 +254,11 @@ class Utils { } else { // HTTP GET $data = json_decode($response['content']); - $result = $data->data; + if (is_object($data)) { + $result = $data->data; + } else { + $result = array('No result'); + } } } else { $result = ($data) ? false : array();