|
|
@@ -516,6 +516,34 @@ function zimbraSingleCreateCustomFields($packageconfigoption)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+function zimbraSingleUsageUpdate($params) {
|
|
|
+ $accessData = zimbraSingleGetAccess();
|
|
|
+ $api = new Zm_Auth($accessData['zimbraServer'], $accessData['adminUser'], $accessData['adminPass'], "admin");
|
|
|
+ $login = $api->login();
|
|
|
+ if(is_a($login, "Exception")) {
|
|
|
+ logModuleCall(
|
|
|
+ 'zimbrasingle',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ "Error : cannot login to " . $accessData['zimbraServer'],
|
|
|
+ ""
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $apiAccountManager = new Zm_Account($api);
|
|
|
+ $response = $apiAccountManager->getAllCos();
|
|
|
+ if(is_a($response, "Exception")) {
|
|
|
+ logModuleCall(
|
|
|
+ 'zimbrasingle',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ "Error : could not fetch classes of service",
|
|
|
+ ""
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function recursiveFindAll($haystack, $needle)
|
|
|
{
|
|
|
$values = array();
|