CC-5347 : isScheduled doesn't work for webstreams
This commit is contained in:
parent
a34ae69d4b
commit
4d01e3b11f
4 changed files with 43 additions and 9 deletions
|
@ -1325,20 +1325,14 @@ SQL;
|
|||
}
|
||||
}
|
||||
|
||||
public static function setIsScheduled($p_scheduleItem, $p_status,
|
||||
$p_fileId=null) {
|
||||
public static function setIsScheduled($fileId, $status) {
|
||||
|
||||
if (is_null($p_fileId)) {
|
||||
$fileId = Application_Model_Schedule::GetFileId($p_scheduleItem);
|
||||
} else {
|
||||
$fileId = $p_fileId;
|
||||
}
|
||||
$file = self::RecallById($fileId);
|
||||
$updateIsScheduled = false;
|
||||
|
||||
if (!is_null($fileId) && !in_array($fileId,
|
||||
Application_Model_Schedule::getAllFutureScheduledFiles())) {
|
||||
$file->_file->setDbIsScheduled($p_status)->save();
|
||||
$file->_file->setDbIsScheduled($status)->save();
|
||||
$updateIsScheduled = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -408,6 +408,23 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
|
||||
return $webstream->getDbId();
|
||||
}
|
||||
|
||||
/*
|
||||
* method is not used, webstreams aren't currently kept track of for isScheduled.
|
||||
*/
|
||||
public static function setIsScheduled($p_webstreamId, $p_status) {
|
||||
|
||||
$webstream = CcWebstreamQuery::create()->findPK($p_webstreamId);
|
||||
$updateIsScheduled = false;
|
||||
|
||||
if (isset($webstream) && !in_array($p_webstreamId,
|
||||
Application_Model_Schedule::getAllFutureScheduledWebstreams())) {
|
||||
//$webstream->setDbIsScheduled($p_status)->save();
|
||||
$updateIsScheduled = true;
|
||||
}
|
||||
|
||||
return $updateIsScheduled;
|
||||
}
|
||||
}
|
||||
|
||||
class WebstreamNoPermissionException extends Exception {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue