reverting quota messup

This commit is contained in:
Benjamin Sonntag 2012-08-26 11:01:54 +00:00
parent 2bc7be8e6b
commit d56643cca2
1 changed files with 10 additions and 14 deletions

View File

@ -91,18 +91,13 @@ class m_quota {
}
}
}
// New Hook
$qname=$hooks->invoke("hook_quota_names"); // return strings or arrays
foreach($qname as $res)
if ($res) {
if (is_array($res)) {
foreach($res as $k) {
$qlist[$k]=_("quota_".$k);
$this->clquota[$k]=$c;
}
} else {
$qlist[$res]=_("quota_".$res);
$this->clquota[$res]=$c;
if ($res && is_array($res)) {
foreach($res as $k=>$v) {
$qlist[$k]=$v;
$this->clquota[$k]=$k;
}
}
return $qlist;
@ -140,11 +135,12 @@ class m_quota {
);
}
}
// New Hook :
foreach ($ttmp as $tt) {
$res=$hooks->invoke("",$tt["name"]);
$res=$hooks->invoke("hook_quota_get",array($tt["name"]));
foreach($res as $r) {
if ($r) {
$this->quotas[$tt["name"]]=array("t"=>$tt["total"],"u");
if ($r!==false) {
$this->quotas[$tt["name"]]=array("t"=>$tt["total"],"u"=>$r);
}
}
}