From 6cf236e9bd9817de070e312bd64477ce8b977da1 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 29 Sep 2003 12:00:38 +0000 Subject: [PATCH] do not allow empty quota fields --- lam/templates/profedit/profilecreate.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lam/templates/profedit/profilecreate.php b/lam/templates/profedit/profilecreate.php index 65094fcd..14a34009 100644 --- a/lam/templates/profedit/profilecreate.php +++ b/lam/templates/profedit/profilecreate.php @@ -236,22 +236,22 @@ if ($_GET['type'] == "user") { $acct->quota[$i][6] = $_POST['f_quota_'.$i.'_6']; $acct->quota[$i][7] = $_POST['f_quota_'.$i.'_7']; // Check if values are OK - if (!ereg('^([0-9])*$', $acct->quota[$i][2])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][2])) { StatusMessage('ERROR', _('Block soft quota'), _('Block soft quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][3])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][3])) { StatusMessage('ERROR', _('Block hard quota'), _('Block hard quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][6])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][6])) { StatusMessage('ERROR', _('Inode soft quota'), _('Inode soft quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][7])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][7])) { StatusMessage('ERROR', _('Inode hard quota'), _('Inode hard quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; @@ -301,22 +301,22 @@ elseif ($_GET['type'] == "group") { $acct->quota[$i][6] = $_POST['f_quota_'.$i.'_6']; $acct->quota[$i][7] = $_POST['f_quota_'.$i.'_7']; // Check if values are OK - if (!ereg('^([0-9])*$', $acct->quota[$i][2])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][2])) { StatusMessage('ERROR', _('Block soft quota'), _('Block soft quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][3])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][3])) { StatusMessage('ERROR', _('Block hard quota'), _('Block hard quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][6])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][6])) { StatusMessage('ERROR', _('Inode soft quota'), _('Inode soft quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit; } - if (!ereg('^([0-9])*$', $acct->quota[$i][7])) { + if (!ereg('^([0-9])+$', $acct->quota[$i][7])) { StatusMessage('ERROR', _('Inode hard quota'), _('Inode hard quota contains invalid characters. Only natural numbers are allowed')); echo ("

" . _("Back to Profile Editor") . ""); exit;