Skip to content
Snippets Groups Projects
Commit 6a619d1f authored by Robert Anderson's avatar Robert Anderson
Browse files

* Added passthrough errors to db.php & ajax.php

* Fixed AdminGroups.php
parent 2b5c1ae1
No related branches found
No related tags found
No related merge requests found
......@@ -150,6 +150,10 @@
print_r($soapParams);
$res = removeAdminGroup($soapParams);
if (isset($res)) {
ajaxException($res);
}
break;
case "getWiSPResellers":
......
......@@ -46,15 +46,12 @@ function getAdminGroups($params) {
function removeAdminGroup($params) {
global $db;
$db->errorInfo();
$res = DBDo("DELETE FROM groups WHERE ID = ".$params[0]['id']);
print_r($params);
# If STH is blank, return the error back to whoever requested the data
if (!isset($res)) {
print_r($res->errorInfo());
$res = DBDo("DELETE FROM groups WHERE ID = ".$params[0][0]);
if (!is_numeric($res)) {
return $res;
}
return $res;
return NULL;
}
?>
......@@ -88,6 +88,9 @@ function DBDo($command)
# Perform query
$sth = $db->exec($command);
if ($sth === FALSE) {
return $db->errorInfo();
}
return $sth;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment