summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 83a13f0)
raw | patch | inline | side by side (parent: 83a13f0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 05:35:10 +0000 (05:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 May 2006 05:35:10 +0000 (05:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3571 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_mail-methods-kolab.inc | patch | blob | history |
index acb1210b3b88f25070238105c7ac01cb1f71439f..c6f3f22de7fedb7799848788f463be7da66378d3 100644 (file)
}
+ /* Get quota and divide it by 1024, because in gosa we display in Kb
+ but we get bytes */
+ function getQuota($folder)
+ {
+ $result= array('quotaUsage' => '', 'gosaMailQuota' => '');
+
+ /* Load quota settings */
+ $quota_value = @imap_get_quota($this->mbox, $folder);
+ 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);
+ } else {
+ /* backward icompatible */
+ $result['quotaUsage']= (int) ($quota_value['usage'] / 1024);
+ $result['gosaMailQuota']= (int) ($quota_value['limit'] / 1024);
+ }
+ }elseif(!$quota_value){
+ return(false);
+ }
+
+ return ($result);
+ }
+
+
function fixAttributesOnLoad(&$mailObject)
{
/* Convert attributes and objectClasses */