fixing quota class, sorry boys <3

This commit is contained in:
Benjamin Sonntag 2012-08-25 15:44:50 +00:00
parent 5c6f4071a3
commit 4a8bde0304
1 changed files with 62 additions and 62 deletions

View File

@ -24,17 +24,17 @@
*/ */
/** /**
* Class for hosting quotas management * Class for hosting quotas management
* *
* This class manages services' quotas for each user of AlternC. * This class manages services' quotas for each user of AlternC.
* The available quotas for each service is stored in the system.quotas * The available quotas for each service is stored in the system.quotas
* mysql table. The used value is computed by the class using a * mysql table. The used value is computed by the class using a
* callback function <code>alternc_quota_check($uid)</code> that * callback function <code>alternc_quota_check($uid)</code> that
* may by exported by each service class.<br> * may by exported by each service class.<br>
* each class may also export a function <code>alternc_quota_names()</code> * each class may also export a function <code>alternc_quota_names()</code>
* that returns an array with the quotas names managed by this class. * that returns an array with the quotas names managed by this class.
* *
*/ */
class m_quota { class m_quota {
var $disk=Array( /* disk resource for which we will manage quotas */ var $disk=Array( /* disk resource for which we will manage quotas */
@ -156,6 +156,7 @@ class m_quota {
} }
$get_quota_cache[$cuid] = $this->quotas; $get_quota_cache[$cuid] = $this->quotas;
} }
}
if ($ressource) { if ($ressource) {
if (isset($this->quotas[$ressource]) ) { if (isset($this->quotas[$ressource]) ) {
@ -169,7 +170,6 @@ class m_quota {
} }
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
/** Set the quota for a user (and for a ressource) /** Set the quota for a user (and for a ressource)
* @param string $ressource ressource to set quota of * @param string $ressource ressource to set quota of