summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d51f176)
raw | patch | inline | side by side (parent: d51f176)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 10:11:04 +0000 (10:11 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 10:11:04 +0000 (10:11 +0000) |
Don't touch the quota value 2147483647.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3578 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3578 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-cyrus.inc | patch | blob | history |
index edb4d794121010a2f0db43bf3a7d7eac18b1853e..6eab34624149c8839487f202fed8ec6e1ac8cb32 100644 (file)
if(is_array($quota_value)) {
if (isset($quota_value["STORAGE"]) && is_array($quota_value["STORAGE"])){
/* use for PHP >= 4.3 */
- $result['quotaUsage']= (int) ($quota_value["STORAGE"]['usage'] / 1024);
- $result['gosaMailQuota']= (int) ($quota_value["STORAGE"]['limit'] / 1024);
+ if($quota_value["STORAGE"]['limit'] == 2147483647){
+ $result['quotaUsage']= (int) ($quota_value["STORAGE"]['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value["STORAGE"]['limit'] );
+ }else{
+ $result['quotaUsage']= (int) ($quota_value["STORAGE"]['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value["STORAGE"]['limit'] / 1024);
+ }
} else {
/* backward icompatible */
- $result['quotaUsage']= (int) ($quota_value['usage'] / 1024);
- $result['gosaMailQuota']= (int) ($quota_value['limit'] / 1024);
+ if($quota_value['usage'] == 2147483647){
+ $result['quotaUsage']= (int) ($quota_value['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value['limit'] );
+ }else{
+ $result['quotaUsage']= (int) ($quota_value['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value['limit'] / 1024);
+ }
}
}elseif(!$quota_value){
return(false);
function setQuota($folder, $gosaMailQuota)
{
/* Workaround for the php imap extension */
- if ($gosaMailQuota == ""){
+ if (($gosaMailQuota == "") || ($gosaMailQuota== "2147483647")){
$gosaMailQuota= "2147483647";
}elseif($gosaMailQuota > 0){
$gosaMailQuota = $gosaMailQuota *1024;