Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
20af2c287f
4 changed files with 9 additions and 9 deletions
|
@ -69,7 +69,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
$this->addElement('text', 'add_show_duration', array(
|
$this->addElement('text', 'add_show_duration', array(
|
||||||
'label' => 'Duration:',
|
'label' => 'Duration:',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'value' => '01h00m',
|
'value' => '01h 00m',
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
'decorators' => array('ViewHelper')
|
'decorators' => array('ViewHelper')
|
||||||
));
|
));
|
||||||
|
@ -99,8 +99,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $formData["add_show_duration"] == "0m" ) {
|
if( $formData["add_show_duration"] == "00h 00m" ) {
|
||||||
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration 0m'));
|
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration 00h 00m'));
|
||||||
$valid = false;
|
$valid = false;
|
||||||
}elseif(strpos($formData["add_show_duration"], 'h') !== false && intval(substr($formData["add_show_duration"], 0, strpos($formData["add_show_duration"], 'h'))) > 24) {
|
}elseif(strpos($formData["add_show_duration"], 'h') !== false && intval(substr($formData["add_show_duration"], 0, strpos($formData["add_show_duration"], 'h'))) > 24) {
|
||||||
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration greater than 24h'));
|
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration greater than 24h'));
|
||||||
|
|
|
@ -618,7 +618,7 @@ class Application_Model_Schedule {
|
||||||
'add_show_start_time' => '00:00',
|
'add_show_start_time' => '00:00',
|
||||||
'add_show_end_date_no_repeate' => date("Y-m-d"),
|
'add_show_end_date_no_repeate' => date("Y-m-d"),
|
||||||
'add_show_end_time' => '01:00',
|
'add_show_end_time' => '01:00',
|
||||||
'add_show_duration' => '1h'));
|
'add_show_duration' => '01h 00m'));
|
||||||
|
|
||||||
$formRepeats->populate(array('add_show_end_date' => date("Y-m-d")));
|
$formRepeats->populate(array('add_show_end_date' => date("Y-m-d")));
|
||||||
|
|
||||||
|
|
|
@ -765,7 +765,7 @@ class Application_Model_Show {
|
||||||
return $showDay->getDbDuration();
|
return $showDay->getDbDuration();
|
||||||
}else{
|
}else{
|
||||||
$info = explode(':',$showDay->getDbDuration());
|
$info = explode(':',$showDay->getDbDuration());
|
||||||
return ($info[0] != 0 ? intval($info[0]).'h'.' ' : '').($info[1] != 0 ? intval($info[1]).'m' : '');
|
return str_pad(intval($info[0]),2,'0',STR_PAD_LEFT).'h '.str_pad(intval($info[1]),2,'0',STR_PAD_LEFT).'m';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@ class Version20120403143635 extends AbstractMigration
|
||||||
public function up(Schema $schema)
|
public function up(Schema $schema)
|
||||||
{
|
{
|
||||||
$cc_show = $schema->getTable('cc_show');
|
$cc_show = $schema->getTable('cc_show');
|
||||||
$cc_show->addColumn('live_stream_using_airtime_auth', 'boolean', array('default'=> 'false'));
|
$cc_show->addColumn('live_stream_using_airtime_auth', 'boolean', array('default'=> 0, 'notnull' => 0));
|
||||||
$cc_show->addColumn('live_stream_using_custom_auth', 'boolean', array('default'=> 'false'));
|
$cc_show->addColumn('live_stream_using_custom_auth', 'boolean', array('default'=> 0, 'notnull' => 0));
|
||||||
$cc_show->addColumn('live_stream_user', 'string', array('notnull' => 0, 'length' => 255));
|
$cc_show->addColumn('live_stream_user', 'string', array('default'=> 0, 'notnull' => 0, 'length' => 255));
|
||||||
$cc_show->addColumn('live_stream_pass', 'string', array('notnull' => 0, 'length' => 255));
|
$cc_show->addColumn('live_stream_pass', 'string', array('default'=> 0, 'notnull' => 0, 'length' => 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down(Schema $schema)
|
public function down(Schema $schema)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue