From fe1aa7a169d618bfce9de00784cca3a18e342f8e Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 22 Aug 2012 15:56:18 -0400 Subject: [PATCH] CC-1665: Scheduled stream rebroadcasting and recording -fixed syntax error --- airtime_mvc/application/controllers/LibraryController.php | 6 +++--- airtime_mvc/application/models/Library.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 4cf664a09..c29904974 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -55,11 +55,10 @@ class LibraryController extends Zend_Controller_Action try { $obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME); - //Application_Model_Library::changePlaylist(null, null); if (isset($obj_sess->id)) { - Logging::info($obj_sess->type); - $objInfo = Application_Model_Library::getObjInfo($this->obj_sess->type); Logging::info($obj_sess->id); + Logging::info($obj_sess->type); + $objInfo = Application_Model_Library::getObjInfo($obj_sess->type); $obj = new $objInfo['className']($obj_sess->id); $userInfo = Zend_Auth::getInstance()->getStorage()->read(); $user = new Application_Model_User($userInfo->id); @@ -82,6 +81,7 @@ class LibraryController extends Zend_Controller_Action $this->playlistNotFound($obj_sess->type); } catch (Exception $e) { $this->playlistNotFound($obj_sess->type); + Logging::info($e->getMessage()); //$this->playlistUnknownError($e); } } diff --git a/airtime_mvc/application/models/Library.php b/airtime_mvc/application/models/Library.php index 27e22400f..4245fa47f 100644 --- a/airtime_mvc/application/models/Library.php +++ b/airtime_mvc/application/models/Library.php @@ -13,6 +13,8 @@ class Application_Model_Library $info['className'] = 'Application_Model_Block'; } else if (strcmp($p_type, 'stream')==0) { $info['className'] = 'Application_Model_Webstream'; + } else { + throw new Exception("Unknown object type: '$p_type'"); } return $info; @@ -21,7 +23,6 @@ class Application_Model_Library public static function changePlaylist($p_id, $p_type) { $obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME); - Logging::info($obj_sess); if (is_null($p_id) || is_null($p_type)) { unset($obj_sess->id);