protected function getSoftLimit() { if (self::$loadedSoftLimit != null) { return self::$loadedSoftLimit; } $l = $this->getFilteredOption("SOFT_QUOTA"); if (!empty($l)) { self::$loadedSoftLimit = round($this->getAuthorized() * intval($l) / 100); } else { self::$loadedSoftLimit = false; } return self::$loadedSoftLimit; }
private function getAuthorized() { if (self::$loadedQuota != null) { return self::$loadedQuota; } $q = $this->options["DEFAULT_QUOTA"]; if (!empty($this->options["CUSTOM_DATA_FIELD"])) { $cdField = $this->options["CUSTOM_DATA_FIELD"]; $t = AuthService::getLoggedUser()->getPref("CUSTOM_PARAMS"); if (is_array($t) && array_key_exists($cdField, $t)) { $q = $t[$cdField]; } } self::$loadedQuota = AJXP_Utils::convertBytes($q); return self::$loadedQuota; }