Merge branch '2.1.x' of dev.sourcefabric.org:airtime into 2.1.x
This commit is contained in:
commit
fdb7d55ac1
|
@ -117,7 +117,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
}
|
}
|
||||||
|
|
||||||
$pattern = '/([0-9][0-9])h ([0-9][0-9])m/';
|
$pattern = '/([0-9][0-9])h ([0-9][0-9])m/';
|
||||||
preg_match($pattern, $formData['add_show_duration'], $matches);
|
|
||||||
|
if (preg_match($pattern, $formData['add_show_duration'], $matches) && count($matches) == 3) {
|
||||||
$hours = $matches[1];
|
$hours = $matches[1];
|
||||||
$minutes = $matches[2];
|
$minutes = $matches[2];
|
||||||
if( $formData["add_show_duration"] == "00h 00m" ) {
|
if( $formData["add_show_duration"] == "00h 00m" ) {
|
||||||
|
@ -132,6 +133,10 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration < 0m'));
|
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration < 0m'));
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$valid = false;
|
||||||
|
}
|
||||||
|
|
||||||
return $valid;
|
return $valid;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue