steffen: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php.in, 1.10, 1.11
cvs at kolab.org
cvs at kolab.org
Mon Jan 8 02:29:31 CET 2007
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv26327/kolab-webadmin/www/admin/user
Modified Files:
user.php.in
Log Message:
workaround for issue1262 (32-bit quota limit)
Index: user.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- user.php.in 8 Dec 2006 22:02:35 -0000 1.10
+++ user.php.in 8 Jan 2007 01:29:29 -0000 1.11
@@ -162,6 +162,16 @@
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['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';
More information about the commits
mailing list