CC-3639: Preferences-> Fade In is interpreted improperly (it is insanely high)
- the regular exp check in model class was wrong
This commit is contained in:
parent
ef908ee894
commit
1bb04296a9
|
@ -14,7 +14,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$transition_fade = new Zend_Form_Element_Text("transition_fade");
|
||||
$transition_fade->setLabel("Switch Transition Fade (s)")
|
||||
->setFilters(array('StringTrim'))
|
||||
->addValidator('regex', false, array('/^[0-5][0-9](\.\d{1,6})?$/',
|
||||
->addValidator('regex', false, array('/^[0-9]{1,2}(\.\d{1,6})?$/',
|
||||
'messages' => 'enter a time in seconds 00{.000000}'))
|
||||
->setValue($defaultFade)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
|
|
|
@ -321,7 +321,7 @@ class Application_Model_Scheduler {
|
|||
else {
|
||||
$sched = new CcSchedule();
|
||||
}
|
||||
|
||||
Logging::log(print_r($file,true));
|
||||
$sched->setDbStarts($nextStartDT)
|
||||
->setDbEnds($endTimeDT)
|
||||
->setDbFileId($file['id'])
|
||||
|
|
|
@ -46,7 +46,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
@ -74,7 +74,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -110,7 +110,7 @@ class CcSchedule extends BaseCcSchedule {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
@ -120,7 +120,6 @@ class CcSchedule extends BaseCcSchedule {
|
|||
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
||||
}
|
||||
}
|
||||
|
||||
$this->fade_in = $dt->format('H:i:s.u');
|
||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
||||
|
||||
|
@ -138,7 +137,7 @@ class CcSchedule extends BaseCcSchedule {
|
|||
if ($v instanceof DateTime) {
|
||||
$dt = $v;
|
||||
}
|
||||
else if (preg_match('/^[0-5][0-9](\.\d{1,6})?$/', $v)) {
|
||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||
$dt = DateTime::createFromFormat("s.u", $v);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue