Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x
This commit is contained in:
commit
0084f8ce93
11 changed files with 132 additions and 89 deletions
|
@ -490,6 +490,10 @@ class ApiController extends Zend_Controller_Action
|
|||
$file->setFileExistsFlag(true);
|
||||
$file->setMetadata($md);
|
||||
}
|
||||
if ($md['is_record'] != 0) {
|
||||
$this->uploadRecordedActionParam($md['MDATA_KEY_TRACKNUMBER'], $file->getId());
|
||||
}
|
||||
|
||||
} elseif ($mode == "modify") {
|
||||
$filepath = $md['MDATA_KEY_FILEPATH'];
|
||||
$file = Application_Model_StoredFile::RecallByFilepath($filepath);
|
||||
|
@ -562,7 +566,6 @@ class ApiController extends Zend_Controller_Action
|
|||
// least 1 digit
|
||||
if ( !preg_match('/^md\d+$/', $k) ) { continue; }
|
||||
$info_json = json_decode($raw_json, $assoc = true);
|
||||
unset( $info_json["is_record"] );
|
||||
// Log invalid requests
|
||||
if ( !array_key_exists('mode', $info_json) ) {
|
||||
Logging::info("Received bad request(key=$k), no 'mode' parameter. Bad request is:");
|
||||
|
|
|
@ -454,7 +454,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
|||
$column = CcFilesPeer::getTableMap()->getColumnByPhpName($criteria2PeerMap[$d['sp_criteria_field']]);
|
||||
// validation on type of column
|
||||
if ($d['sp_criteria_field'] == 'length') {
|
||||
if (!preg_match("/(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) {
|
||||
if (!preg_match("/^(\d{2}):(\d{2}):(\d{2})/", $d['sp_criteria_value'])) {
|
||||
$element->addError("'Length' should be in '00:00:00' format");
|
||||
$isValid = false;
|
||||
}
|
||||
|
|
|
@ -713,6 +713,7 @@ SQL;
|
|||
'end' => $stream_end,
|
||||
'uri' => $uri,
|
||||
'type' => 'stream_buffer_end',
|
||||
'row_id' => $item["id"],
|
||||
'independent_event' => true
|
||||
);
|
||||
self::appendScheduleItem($data, $stream_end, $schedule_item);
|
||||
|
@ -1127,7 +1128,6 @@ SQL;
|
|||
}
|
||||
} else {
|
||||
if ($isAdminOrPM) {
|
||||
Logging::info( $data );
|
||||
Application_Model_Show::create($data);
|
||||
}
|
||||
|
||||
|
|
|
@ -198,7 +198,9 @@ class Application_Model_ShowBuilder
|
|||
} elseif (intval($p_item["si_record"]) === 1) {
|
||||
$row["record"] = true;
|
||||
|
||||
if (Application_Model_Preference::GetUploadToSoundcloudOption()) {
|
||||
// at the time of creating on show, the recorded file is not in the DB yet.
|
||||
// therefore, 'si_file_id' is null. So we need to check it.
|
||||
if (Application_Model_Preference::GetUploadToSoundcloudOption() && isset($p_item['si_file_id'])) {
|
||||
$file = Application_Model_StoredFile::Recall(
|
||||
$p_item['si_file_id']);
|
||||
if (isset($file)) {
|
||||
|
@ -398,7 +400,7 @@ class Application_Model_ShowBuilder
|
|||
|
||||
//see if the displayed show instances have changed. (deleted,
|
||||
//empty schedule etc)
|
||||
if ($outdated === false && count($instances)
|
||||
if ($outdated === false && count($instances)
|
||||
!== count($currentInstances)) {
|
||||
Logging::debug("show instances have changed.");
|
||||
$outdated = true;
|
||||
|
@ -459,7 +461,7 @@ class Application_Model_ShowBuilder
|
|||
$display_items[] = $row;
|
||||
}
|
||||
|
||||
if ($current_id !== -1 &&
|
||||
if ($current_id !== -1 &&
|
||||
!in_array($current_id, $this->showInstances)) {
|
||||
$this->showInstances[] = $current_id;
|
||||
}
|
||||
|
|
|
@ -127,9 +127,9 @@ class CcSchedule extends BaseCcSchedule {
|
|||
}
|
||||
|
||||
if ($microsecond == 0) {
|
||||
$this->fadein = $dt->format('H:i:s.u');
|
||||
$this->fade_in = $dt->format('H:i:s.u');
|
||||
} else {
|
||||
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
||||
$this->fade_in = $dt->format('H:i:s').".".$microsecond;
|
||||
}
|
||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
||||
|
||||
|
@ -164,9 +164,9 @@ class CcSchedule extends BaseCcSchedule {
|
|||
}
|
||||
|
||||
if ($microsecond == 0) {
|
||||
$this->fadeout = $dt->format('H:i:s.u');
|
||||
$this->fade_out = $dt->format('H:i:s.u');
|
||||
} else {
|
||||
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
||||
$this->fade_out = $dt->format('H:i:s').".".$microsecond;
|
||||
}
|
||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_OUT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue