Author: mcantelon
Date: Wed Jan 11 15:55:11 2012
New Revision: 10647
Log:
Minor refactor.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Wed Jan 11 14:54:18 2012
(r10646)
+++ trunk/lib/task/csvImportTask.class.php Wed Jan 11 15:55:11 2012
(r10647)
@@ -55,14 +55,14 @@
protected function validateOptions($options)
{
- if ($options['rows-until-update'] &&
!is_numeric($options['rows-until-update']))
- {
- throw new sfException('rows-until-update must be an integer');
- }
+ $numericOptions = array('rows-until-update', 'skip-rows');
- if ($options['skip-rows'] && !is_numeric($options['skip-rows']))
+ foreach($numericOptions as $option)
{
- throw new sfException('skip-rows must be an integer');
+ if ($options[$option] && !is_numeric($options[$option]))
+ {
+ throw new sfException($option .' must be an integer');
+ }
}
}
--
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.