summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3dee552)
raw | patch | inline | side by side (parent: 3dee552)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 09:54:34 +0000 (09:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 09:54:34 +0000 (09:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3576 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-cyrus.inc | patch | blob | history |
index 0e51a9c86d9ab027119270e423097bc3a5622535..edb4d794121010a2f0db43bf3a7d7eac18b1853e 100644 (file)
if(is_array($quota_value)) {
if (isset($quota_value["STORAGE"]) && is_array($quota_value["STORAGE"])){
/* use for PHP >= 4.3 */
- $result['quotaUsage']= $quota_value["STORAGE"]['usage'];
- $result['gosaMailQuota']= $quota_value["STORAGE"]['limit'];
+ $result['quotaUsage']= (int) ($quota_value["STORAGE"]['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value["STORAGE"]['limit'] / 1024);
} else {
/* backward icompatible */
- $result['quotaUsage']= $quota_value['usage'];
- $result['gosaMailQuota']= $quota_value['limit'];
+ $result['quotaUsage']= (int) ($quota_value['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value['limit'] / 1024);
}
}elseif(!$quota_value){
return(false);
/* Workaround for the php imap extension */
if ($gosaMailQuota == ""){
$gosaMailQuota= "2147483647";
+ }elseif($gosaMailQuota > 0){
+ $gosaMailQuota = $gosaMailQuota *1024;
}
-
+
+
/* Write mail quota */
if (!imap_set_quota($this->mbox, $folder, $gosaMailQuota)){
print_red(sprintf(_("Can't write IMAP quota. Server says '%s'."), imap_last_error()));