CC-3592 : Calendar-> Recorded Shows do not get Rebroadcasted at the moment

added a flag whether to check user permissions or not.
This commit is contained in:
Naomi Aro 2012-04-12 18:00:38 +02:00
parent d06b3573e9
commit adddd1085c
2 changed files with 13 additions and 5 deletions

View file

@ -352,7 +352,7 @@ class Application_Model_ShowInstance {
* @param int $plId
* Playlist ID.
*/
public function addPlaylistToShow($pl_id)
public function addPlaylistToShow($pl_id, $checkUserPerm = true)
{
$ts = intval($this->_showInstance->getDbLastScheduled("U")) ? : 0;
$id = $this->_showInstance->getDbId();
@ -369,12 +369,13 @@ class Application_Model_ShowInstance {
*
* @param int $file_id
*/
public function addFileToShow($file_id)
public function addFileToShow($file_id, $checkUserPerm = true)
{
$ts = intval($this->_showInstance->getDbLastScheduled("U")) ? : 0;
$id = $this->_showInstance->getDbId();
$scheduler = new Application_Model_Scheduler();
$scheduler->setCheckUserPermissions($checkUserPerm);
$scheduler->scheduleAfter(
array(array("id" => 0, "instance" => $id, "timestamp" => $ts)),
array(array("id" => $file_id, "type" => "audioclip"))
@ -553,7 +554,7 @@ class Application_Model_ShowInstance {
try {
$rebroad = new Application_Model_ShowInstance($rebroadcast->getDbId());
$rebroad->addFileToShow($file_id);
$rebroad->addFileToShow($file_id, false);
}
catch (Exception $e) {
Logging::log("{$e->getFile()}");