Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
1f3bab2458
|
@ -44,7 +44,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view = $this->getResource('view');
|
||||
$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/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
@ -60,7 +59,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view = $this->getResource('view');
|
||||
$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-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");
|
||||
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
|
||||
//needed for smart blocks
|
||||
|
@ -438,13 +438,9 @@ class ApiController extends Zend_Controller_Action
|
|||
$file = Application_Model_StoredFile::Recall($file_id);
|
||||
//$show_instance = $this->_getParam('show_instance');
|
||||
|
||||
$show_name = null;
|
||||
try {
|
||||
$show_inst = new Application_Model_ShowInstance($show_instance_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) {
|
||||
//we've reached here probably because the show was
|
||||
|
@ -567,16 +563,13 @@ class ApiController extends Zend_Controller_Action
|
|||
// to some unique id.
|
||||
$request = $this->getRequest();
|
||||
$responses = array();
|
||||
$dry = $request->getParam('dry') || false;
|
||||
$params = $request->getParams();
|
||||
$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
|
||||
// least 1 digit
|
||||
if ( !preg_match('/^md\d+$/', $k) ) { continue; }
|
||||
$info_json = json_decode($raw_json, $assoc = true);
|
||||
$recorded = $info_json["is_record"];
|
||||
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:");
|
||||
|
@ -623,8 +616,6 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
public function listAllWatchedDirsAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$result = array();
|
||||
|
||||
$arrWatchedDirs = Application_Model_MusicDir::getWatchedDirs();
|
||||
|
@ -665,8 +656,6 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
public function getStreamSettingAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$info = Application_Model_StreamSetting::getStreamSetting();
|
||||
$this->view->msg = $info;
|
||||
}
|
||||
|
@ -720,7 +709,6 @@ class ApiController extends Zend_Controller_Action
|
|||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$msg = $request->getParam('msg');
|
||||
$sourcename = $request->getParam('sourcename');
|
||||
$status = $request->getParam('status');
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$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');
|
||||
|
@ -84,8 +82,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$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/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']);
|
||||
|
@ -113,8 +109,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$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/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']);
|
||||
|
@ -236,8 +230,6 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$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/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']);
|
||||
|
|
|
@ -44,7 +44,6 @@ class DashboardController extends Zend_Controller_Action
|
|||
|
||||
public function switchSourceAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$sourcename = $this->_getParam('sourcename');
|
||||
$current_status = $this->_getParam('status');
|
||||
|
||||
|
|
|
@ -177,7 +177,6 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$now = floatval(microtime(true));
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
$menu = array();
|
||||
|
||||
$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));
|
||||
$show_filter = intval($request->getParam("showFilter", 0));
|
||||
$my_shows = intval($request->getParam("myShows", 0));
|
||||
$timestamp = intval($request->getParam("timestamp", -1));
|
||||
|
||||
$startsDT = DateTime::createFromFormat("U", $starts_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()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$showInstance = $request->getParam("instanceId");
|
||||
throw new Exception("this controller is/was a no-op please fix your
|
||||
code");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1612,8 +1612,6 @@ SQL;
|
|||
*/
|
||||
public static function getShows($start_timestamp, $end_timestamp, $onlyRecord=FALSE)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
|
||||
//UTC DateTime object
|
||||
$showsPopUntil = Application_Model_Preference::GetShowsPopulatedUntil();
|
||||
//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 = "")
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$con = Propel::getConnection();
|
||||
|
||||
// defaults to retrieving shows from next 2 days if no end time has
|
||||
// been specified
|
||||
if ($timeEnd == "") {
|
||||
|
@ -2099,19 +2094,10 @@ WHERE si.show_id = s.id
|
|||
ORDER BY si.starts
|
||||
LIMIT :lim
|
||||
SQL;
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindParam(':timeStart', $timeStart);
|
||||
$stmt->bindParam(':timeEnd', $timeEnd);
|
||||
$stmt->bindParam(':lim', $limit);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
} else {
|
||||
$msg = implode(',', $stmt->errorInfo());
|
||||
throw new Exception("Error: $msg");
|
||||
}
|
||||
|
||||
return Application_Common_Database::prepareAndExecute( $sql, array(
|
||||
':timeStart' => $timeStart,
|
||||
':timeEnd' => $timeEnd,
|
||||
':lim' => $limit), 'all');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2123,8 +2109,6 @@ SQL;
|
|||
*/
|
||||
public static function convertToLocalTimeZone(&$rows, $columnsToConvert)
|
||||
{
|
||||
$timezone = date_default_timezone_get();
|
||||
|
||||
if (!is_array($rows)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue