Fixed a lot of unused variables
This commit is contained in:
parent
536fdabb77
commit
cc88a9a8e3
|
@ -44,7 +44,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
|
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']);
|
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
|
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
@ -59,7 +58,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||||
|
|
||||||
$view = $this->getResource('view');
|
$view = $this->getResource('view');
|
||||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||||
|
|
|
@ -350,7 +350,7 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
$media_id = $this->_getParam("media_id");
|
$media_id = $this->_getParam("media_id");
|
||||||
Logging::debug("Received notification of new media item start: $media_id");
|
Logging::debug("Received notification of new media item start: $media_id");
|
||||||
$result = Application_Model_Schedule::UpdateMediaPlayedStatus($media_id);
|
Application_Model_Schedule::UpdateMediaPlayedStatus($media_id);
|
||||||
|
|
||||||
//set a 'last played' timestamp for media item
|
//set a 'last played' timestamp for media item
|
||||||
//needed for smart blocks
|
//needed for smart blocks
|
||||||
|
@ -438,13 +438,9 @@ class ApiController extends Zend_Controller_Action
|
||||||
$file = Application_Model_StoredFile::Recall($file_id);
|
$file = Application_Model_StoredFile::Recall($file_id);
|
||||||
//$show_instance = $this->_getParam('show_instance');
|
//$show_instance = $this->_getParam('show_instance');
|
||||||
|
|
||||||
$show_name = null;
|
|
||||||
try {
|
try {
|
||||||
$show_inst = new Application_Model_ShowInstance($show_instance_id);
|
$show_inst = new Application_Model_ShowInstance($show_instance_id);
|
||||||
$show_inst->setRecordedFile($file_id);
|
$show_inst->setRecordedFile($file_id);
|
||||||
$show_name = $show_inst->getName();
|
|
||||||
$show_genre = $show_inst->getGenre();
|
|
||||||
$show_start_time = Application_Common_DateHelper::ConvertToLocalDateTimeString($show_inst->getShowInstanceStart());
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//we've reached here probably because the show was
|
//we've reached here probably because the show was
|
||||||
|
@ -567,16 +563,13 @@ class ApiController extends Zend_Controller_Action
|
||||||
// to some unique id.
|
// to some unique id.
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$responses = array();
|
$responses = array();
|
||||||
$dry = $request->getParam('dry') || false;
|
|
||||||
$params = $request->getParams();
|
$params = $request->getParams();
|
||||||
$valid_modes = array('delete_dir', 'delete', 'moved', 'modify', 'create');
|
$valid_modes = array('delete_dir', 'delete', 'moved', 'modify', 'create');
|
||||||
foreach ($request->getParams() as $k => $raw_json) {
|
foreach ($params as $k => $raw_json) {
|
||||||
// Valid requests must start with mdXXX where XXX represents at
|
// Valid requests must start with mdXXX where XXX represents at
|
||||||
// least 1 digit
|
// least 1 digit
|
||||||
if ( !preg_match('/^md\d+$/', $k) ) { continue; }
|
if ( !preg_match('/^md\d+$/', $k) ) { continue; }
|
||||||
$info_json = json_decode($raw_json, $assoc = true);
|
$info_json = json_decode($raw_json, $assoc = true);
|
||||||
$recorded = $info_json["is_record"];
|
|
||||||
unset( $info_json["is_record"] );
|
|
||||||
// Log invalid requests
|
// Log invalid requests
|
||||||
if ( !array_key_exists('mode', $info_json) ) {
|
if ( !array_key_exists('mode', $info_json) ) {
|
||||||
Logging::info("Received bad request(key=$k), no 'mode' parameter. Bad request is:");
|
Logging::info("Received bad request(key=$k), no 'mode' parameter. Bad request is:");
|
||||||
|
@ -623,8 +616,6 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function listAllWatchedDirsAction()
|
public function listAllWatchedDirsAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
$arrWatchedDirs = Application_Model_MusicDir::getWatchedDirs();
|
$arrWatchedDirs = Application_Model_MusicDir::getWatchedDirs();
|
||||||
|
@ -665,8 +656,6 @@ class ApiController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function getStreamSettingAction()
|
public function getStreamSettingAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
|
||||||
|
|
||||||
$info = Application_Model_StreamSetting::getStreamSetting();
|
$info = Application_Model_StreamSetting::getStreamSetting();
|
||||||
$this->view->msg = $info;
|
$this->view->msg = $info;
|
||||||
}
|
}
|
||||||
|
@ -720,7 +709,6 @@ class ApiController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
||||||
$msg = $request->getParam('msg');
|
|
||||||
$sourcename = $request->getParam('sourcename');
|
$sourcename = $request->getParam('sourcename');
|
||||||
$status = $request->getParam('status');
|
$status = $request->getParam('status');
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile(
|
$this->view->headScript()->appendFile(
|
||||||
$baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],
|
$baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],
|
||||||
'text/javascript');
|
'text/javascript');
|
||||||
|
@ -84,8 +82,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
@ -113,8 +109,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
@ -236,8 +230,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
$baseUrl = $request->getBaseUrl();
|
||||||
|
|
||||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/audiopreview/preview_jplayer.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/jplayer/jplayer.playlist.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'/js/jplayer/skin/jplayer.airtime.audio.preview.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
|
@ -44,7 +44,6 @@ class DashboardController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function switchSourceAction()
|
public function switchSourceAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
|
||||||
$sourcename = $this->_getParam('sourcename');
|
$sourcename = $this->_getParam('sourcename');
|
||||||
$current_status = $this->_getParam('status');
|
$current_status = $this->_getParam('status');
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,6 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
$now = floatval(microtime(true));
|
$now = floatval(microtime(true));
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$baseUrl = $request->getBaseUrl();
|
|
||||||
$menu = array();
|
$menu = array();
|
||||||
|
|
||||||
$user = Application_Model_User::getCurrentUser();
|
$user = Application_Model_User::getCurrentUser();
|
||||||
|
@ -266,7 +265,6 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
$ends_epoch = $request->getParam("end", $current_time + (60*60*24));
|
$ends_epoch = $request->getParam("end", $current_time + (60*60*24));
|
||||||
$show_filter = intval($request->getParam("showFilter", 0));
|
$show_filter = intval($request->getParam("showFilter", 0));
|
||||||
$my_shows = intval($request->getParam("myShows", 0));
|
$my_shows = intval($request->getParam("myShows", 0));
|
||||||
$timestamp = intval($request->getParam("timestamp", -1));
|
|
||||||
|
|
||||||
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
|
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
|
||||||
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
|
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
|
||||||
|
@ -347,8 +345,7 @@ class ShowbuilderController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function scheduleReorderAction()
|
public function scheduleReorderAction()
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
throw new Exception("this controller is/was a no-op please fix your
|
||||||
|
code");
|
||||||
$showInstance = $request->getParam("instanceId");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1612,8 +1612,6 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public static function getShows($start_timestamp, $end_timestamp, $onlyRecord=FALSE)
|
public static function getShows($start_timestamp, $end_timestamp, $onlyRecord=FALSE)
|
||||||
{
|
{
|
||||||
$con = Propel::getConnection();
|
|
||||||
|
|
||||||
//UTC DateTime object
|
//UTC DateTime object
|
||||||
$showsPopUntil = Application_Model_Preference::GetShowsPopulatedUntil();
|
$showsPopUntil = Application_Model_Preference::GetShowsPopulatedUntil();
|
||||||
//if application is requesting shows past our previous populated until date, generate shows up until this point.
|
//if application is requesting shows past our previous populated until date, generate shows up until this point.
|
||||||
|
@ -2067,9 +2065,6 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public static function getNextShows($timeStart, $limit = "ALL", $timeEnd = "")
|
public static function getNextShows($timeStart, $limit = "ALL", $timeEnd = "")
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
|
||||||
$con = Propel::getConnection();
|
|
||||||
|
|
||||||
// defaults to retrieving shows from next 2 days if no end time has
|
// defaults to retrieving shows from next 2 days if no end time has
|
||||||
// been specified
|
// been specified
|
||||||
if ($timeEnd == "") {
|
if ($timeEnd == "") {
|
||||||
|
@ -2099,19 +2094,10 @@ WHERE si.show_id = s.id
|
||||||
ORDER BY si.starts
|
ORDER BY si.starts
|
||||||
LIMIT :lim
|
LIMIT :lim
|
||||||
SQL;
|
SQL;
|
||||||
|
return Application_Common_Database::prepareAndExecute( $sql, array(
|
||||||
$stmt = $con->prepare($sql);
|
':timeStart' => $timeStart,
|
||||||
$stmt->bindParam(':timeStart', $timeStart);
|
':timeEnd' => $timeEnd,
|
||||||
$stmt->bindParam(':timeEnd', $timeEnd);
|
':lim' => $limit), 'all');
|
||||||
$stmt->bindParam(':lim', $limit);
|
|
||||||
|
|
||||||
if ($stmt->execute()) {
|
|
||||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
} else {
|
|
||||||
$msg = implode(',', $stmt->errorInfo());
|
|
||||||
throw new Exception("Error: $msg");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2123,8 +2109,6 @@ SQL;
|
||||||
*/
|
*/
|
||||||
public static function convertToLocalTimeZone(&$rows, $columnsToConvert)
|
public static function convertToLocalTimeZone(&$rows, $columnsToConvert)
|
||||||
{
|
{
|
||||||
$timezone = date_default_timezone_get();
|
|
||||||
|
|
||||||
if (!is_array($rows)) {
|
if (!is_array($rows)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue