I'm unsure if it's a bug in roundcube or if I'm doing it wrong so I'm posting on the list instead of making a ticket in the trac system.
Anyhow, I'm trying to add local directories of my users so that the size of their other personal directories are added to the total used quota. The problem is that the quota bar isn't affected by my changes. Here's some code for reproduction:
public function quota($args) {
$args['used'] .= 1048576;
return($args);
}
The quota is completely unaffected by this, judging from the quota bar that works in other cases.
Is this a bug or am I doing it wrong?
List info: http://lists.roundcube.net/dev/
John,
-----Original Message----- public function quota($args) { $args['used'] .= 1048576; return($args); }
There may be other issues, but wouldn't you want to add (+=) this to the quota value instead of appending (.=) it to the end of the current value?
-Brad _______________________________________________ List info: http://lists.roundcube.net/dev/
I had a quick browse in the code. You need to set $args['percent']. So, add 'used' (+= , not .=) and then recalculate $args['percent'] based on $args['total'] and set that as well.
That works. Tried it myself.
Cor
List info: http://lists.roundcube.net/dev/