cf commit [1808]
This commit is contained in:
		
							parent
							
								
									05dfb324a5
								
							
						
					
					
						commit
						e2272fb4e3
					
				|  | @ -120,10 +120,17 @@ class m_quota { | ||||||
|    * @param string ressource to get quota of |    * @param string ressource to get quota of | ||||||
|    * @Return the quota used and total for this ressource (or for all ressource if unspecified) |    * @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; |     global $db,$err,$cuid; | ||||||
|     $err->log("quota","getquota",$ressource); |     $err->log("quota","getquota",$ressource); | ||||||
|     $this->qlist(); // Generate the quota list.
 |     $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';"); |     $db->query("select * from quotas where uid='$cuid';"); | ||||||
|     if ($db->num_rows()==0) { |     if ($db->num_rows()==0) { | ||||||
|       return array("t"=>0, "u"=>0); |       return array("t"=>0, "u"=>0); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Camille Lafitte
						Camille Lafitte