Author: david
Date: Tue Aug 16 15:04:26 2011
New Revision: 9508
Log:
Prevent entering negative value for repository_quota
Modified:
trunk/lib/form/SettingsGlobalForm.class.php
Modified: trunk/lib/form/SettingsGlobalForm.class.php
==============================================================================
--- trunk/lib/form/SettingsGlobalForm.class.php Tue Aug 16 15:00:00 2011
(r9507)
+++ trunk/lib/form/SettingsGlobalForm.class.php Tue Aug 16 15:04:26 2011
(r9508)
@@ -131,7 +131,9 @@
$this->validatorSchema['inherit_code_informationobject'] = new
sfValidatorInteger(array('required' => false));
$this->validatorSchema['sort_treeview_informationobject'] = new
sfValidatorString(array('required' => false));
$this->validatorSchema['multi_repository'] = new
sfValidatorInteger(array('required' => false));
- $this->validatorSchema['repository_quota'] = new
sfValidatorNumber(array('required' => false));
+ $this->validatorSchema['repository_quota'] = new sfValidatorNumber(
+ array('required' => true, 'min' => 0),
+ array('min' => __('Quota can not be negative')));
$this->validatorSchema['explode_multipage_files'] = new
sfValidatorInteger(array('required' => false));
$this->validatorSchema['show_tooltips'] = new
sfValidatorInteger(array('required' => false));
$this->validatorSchema['defaultPubStatus'] = new
sfValidatorChoice(array('choices' =>
array(QubitTerm::PUBLICATION_STATUS_DRAFT_ID,
QubitTerm::PUBLICATION_STATUS_PUBLISHED_ID)));
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.