summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02973fe)
raw | patch | inline | side by side (parent: 02973fe)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 06:08:46 +0000 (06:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 06:08:46 +0000 (06:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19927 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_jsonRPC.inc | patch | blob | history |
index 12bb2af727e989d6c9d9579cd3dd5580c14952e5..d1287d1d83da89a4da2bb973fb376fdf9cf130d0 100644 (file)
private $config;
private $id;
private $lastStats = array();
+ private $lastResult = array();
private $lastAction = "none";
public function get_error()
{
if($this->lastStats['http_code'] != 200){
- return($this->getHttpStatusCodeMessage($this->lastStats['http_code']));
+ $error = $this->getHttpStatusCodeMessage($this->lastStats['http_code']);
+ if(isset($this->lastResult['error']['message'])){
+ $error .= ": ".$this->lastResult['error']['message'];
+ }
+ return($error);
}else{
return(curl_error($this->curlHandler));
}
}
+
/*! \brief Returns TRUE if the last action was successfull else FALSE.
* @return boolean TRUE on success else FALSE.
}else{
DEBUG (DEBUG_RPC, __LINE__, __FUNCTION__, __FILE__,bold($this->get_error())."<br>".$response, "Result (FAILED): ");
}
- if(isset($response['error']) && !empty($response['error'])) print_a(array($response));
+ if(isset($response['error']) && !empty($response['error'])){
+ print_a(array($response));
+ }
return($response['result']);
}
// Set current result stats.
$this->lastStats = curl_getinfo($this->curlHandler);
+ $this->lastResult = $response;
return($response);
}