cf commit [1808]

This commit is contained in:
Camille Lafitte 2007-09-09 21:09:10 +00:00
parent 05dfb324a5
commit e2272fb4e3
1 changed files with 8 additions and 1 deletions

View File

@ -120,10 +120,17 @@ class m_quota {
* @param string ressource to get quota of
* @Return the quota used and total for this ressource (or for all ressource if unspecified)
*/
function getquota($ressource="") {
function getquota($ressource="",$force= false) {
global $db,$err,$cuid;
$err->log("quota","getquota",$ressource);
$this->qlist(); // Generate the quota list.
if ($force == false && $this->quotas) {
if ($ressource) {
return $this->quotas[$ressource];
} else {
return $this->quotas;
}
}
$db->query("select * from quotas where uid='$cuid';");
if ($db->num_rows()==0) {
return array("t"=>0, "u"=>0);