summaryrefslogtreecommitdiff
path: root/www/admin
diff options
context:
space:
mode:
authorSteffen Hansen <steffen@kdab.com>2007-01-08 01:29:29 (GMT)
committerSteffen Hansen <steffen@kdab.com>2007-01-08 01:29:29 (GMT)
commitf76d4fc0bc2bbb6a87885ca1fc806e4687479dc6 (patch)
treee14b97098b4b7000bcbda1332a61fe8388994552 /www/admin
parent485bd7c0fc65b0306757db1434e301e827a4dc55 (diff)
downloadkolab-webadmin-f76d4fc0bc2bbb6a87885ca1fc806e4687479dc6.tar.gz
workaround for issue1262 (32-bit quota limit)
Diffstat (limited to 'www/admin')
-rw-r--r--www/admin/user/user.php.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/www/admin/user/user.php.in b/www/admin/user/user.php.in
index eaa4158..a72ac1a 100644
--- a/www/admin/user/user.php.in
+++ b/www/admin/user/user.php.in
@@ -162,6 +162,16 @@ function checkpw( $form, $key, $value ) {
return '';
}
+// Due to a cyrus imapd bug we can't currently
+// support quotas over 4095 MB, see issue1262
+function checkquota( $form, $key, $value )
+{
+ if( empty($value) ) return ''; // OK
+ else if( $value >= 4096 ) return _('Quota must be smaller than 4096');
+ else if( $value < 0 ) return _('Quota can not be negative');
+ else return '';
+}
+
function policy2number( $pol, $default = 3 )
{
// Translate policy to number
@@ -436,7 +446,8 @@ $entries['telephoneNumber_0'] = array( 'name' => _('Telephone Number') );
$entries['facsimileTelephoneNumber_0'] = array( 'name' => _('Fax Number') );
if( $auth->group() == 'admin' || $auth->group() == 'maintainer' || $auth->group() == 'domain-maintainer' ) {
$entries['cyrus-userquota'] = array( 'name' => _('User Quota in MBytes'),
- 'comment' => _('Leave blank for unlimited') );
+ 'comment' => _('Leave blank for unlimited'),
+ 'validation' => 'checkquota');
} else {
$entries['givenname']['attrs'] = 'readonly';
$entries['sn']['attrs'] = 'readonly';