summaryrefslogtreecommitdiff
path: root/www/admin/sharedfolder/sf.php.in
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2007-07-12 05:17:31 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2007-07-12 05:17:31 (GMT)
commitcae2580e3fa19b14b49d552a3fbe4f0008c8cb4b (patch)
treef4719b5b9fa4b06833b990cc53b451655d967e73 /www/admin/sharedfolder/sf.php.in
parent3f6b1b803a8433eb9d9c1299d1497e642b2134e3 (diff)
downloadkolab-webadmin-cae2580e3fa19b14b49d552a3fbe4f0008c8cb4b.tar.gz
* www/admin/domainmaintainer/domainmaintainer.php.in:
* www/admin/sharedfolder/sf.php.in: * www/admin/addressbook/addr.php.in: * www/admin/user/user.php.in: fixed kolab/issue932 (Illegal values in webadmin cause LDAP errors) https://intevation.de/roundup/kolab/issue932
Diffstat (limited to 'www/admin/sharedfolder/sf.php.in')
-rw-r--r--www/admin/sharedfolder/sf.php.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/www/admin/sharedfolder/sf.php.in b/www/admin/sharedfolder/sf.php.in
index 0cf38a7..b36fccc 100644
--- a/www/admin/sharedfolder/sf.php.in
+++ b/www/admin/sharedfolder/sf.php.in
@@ -25,6 +25,18 @@ if( $group != 'maintainer' && $group != 'admin' && $group != 'domain-maintainer'
array_push($errors, _("Error: You don't have Permissions to access this Menu"));
}
+// 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 if( !is_numeric($value) ) return _('Quota must be a number');
+ else if( (int) $value != $value ) return _('Quota must be an integer');
+ else return '';
+}
+
require_once('@kolab_php_module_prefix@admin/include/menu.php');
function fill_form_for_modify( &$form, &$ldap_object ) {
@@ -130,7 +142,8 @@ $entries = array( 'cn' => array( 'name' => _('Folder Name'),
'value' => '' ),
'cyrus-userquota' => array( 'name' => _('Quota Limit'),
- 'comment' => _('MBytes (empty for unlimited)') ),
+ 'comment' => _('MBytes (empty for unlimited)'),
+ 'validation' => 'checkquota' ),
'acl_0' => array( 'name' => _('Permission for UID/GID'),
'type' => 'aclselect',
'user' => 'anyone',