Merge branch '2.1.x' into devel
Conflicts: airtime_mvc/application/controllers/ApiController.php
This commit is contained in:
commit
3e75b28c9d
|
@ -43,7 +43,7 @@ $ccAcl->allow('G', 'index')
|
||||||
->allow('A', 'playouthistory')
|
->allow('A', 'playouthistory')
|
||||||
->allow('A', 'user')
|
->allow('A', 'user')
|
||||||
->allow('A', 'systemstatus')
|
->allow('A', 'systemstatus')
|
||||||
->allow('A', 'preference', 'admin');
|
->allow('A', 'preference');
|
||||||
|
|
||||||
|
|
||||||
$aclPlugin = new Zend_Controller_Plugin_Acl($ccAcl);
|
$aclPlugin = new Zend_Controller_Plugin_Acl($ccAcl);
|
||||||
|
|
|
@ -136,9 +136,10 @@ class ApiController extends Zend_Controller_Action
|
||||||
*/
|
*/
|
||||||
if (!$file_base_name) {
|
if (!$file_base_name) {
|
||||||
$file_base_name = $full_path;
|
$file_base_name = $full_path;
|
||||||
}
|
} else {
|
||||||
$file_base_name = substr($file_base_name, 1);
|
$file_base_name = substr($file_base_name, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// possibly use fileinfo module here in the future.
|
// possibly use fileinfo module here in the future.
|
||||||
// http://www.php.net/manual/en/book.fileinfo.php
|
// http://www.php.net/manual/en/book.fileinfo.php
|
||||||
$ext = pathinfo($fileID, PATHINFO_EXTENSION);
|
$ext = pathinfo($fileID, PATHINFO_EXTENSION);
|
||||||
|
|
|
@ -35,14 +35,20 @@ class Logging {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function log($p_msg){
|
public static function log($p_msg){
|
||||||
|
$bt = debug_backtrace();
|
||||||
|
$caller = array_shift($bt);
|
||||||
|
|
||||||
$logger = self::getLogger();
|
$logger = self::getLogger();
|
||||||
$logger->info(self::toString($p_msg));
|
$logger->info(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function debug($p_msg){
|
public static function debug($p_msg){
|
||||||
|
$bt = debug_backtrace();
|
||||||
|
$caller = array_shift($bt);
|
||||||
|
|
||||||
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
|
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
|
||||||
$logger = self::getLogger();
|
$logger = self::getLogger();
|
||||||
$logger->debug(self::toString($p_msg));
|
$logger->debug(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,6 @@ class Application_Model_ShowBuilder {
|
||||||
$row["title"] = $p_item["show_name"];
|
$row["title"] = $p_item["show_name"];
|
||||||
$row["instance"] = intval($p_item["si_id"]);
|
$row["instance"] = intval($p_item["si_id"]);
|
||||||
$row["image"] = '';
|
$row["image"] = '';
|
||||||
$row["id"] = -1;
|
|
||||||
|
|
||||||
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
|
||||||
|
|
||||||
|
@ -311,7 +310,6 @@ class Application_Model_ShowBuilder {
|
||||||
$row = $this->defaultRowArray;
|
$row = $this->defaultRowArray;
|
||||||
$row["footer"] = true;
|
$row["footer"] = true;
|
||||||
$row["instance"] = intval($p_item["si_id"]);
|
$row["instance"] = intval($p_item["si_id"]);
|
||||||
$row["id"] = -1;
|
|
||||||
$this->getRowTimestamp($p_item, $row);
|
$this->getRowTimestamp($p_item, $row);
|
||||||
|
|
||||||
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
||||||
|
|
|
@ -589,7 +589,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
$nRow.addClass("sb-future");
|
$nRow.addClass("sb-future");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aData.allowed !== true || aData.header === true) {
|
if (aData.allowed !== true) {
|
||||||
$nRow.addClass("sb-not-allowed");
|
$nRow.addClass("sb-not-allowed");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -679,7 +679,15 @@ var AIRTIME = (function(AIRTIME){
|
||||||
//re-highlight selected cursors before draw took place
|
//re-highlight selected cursors before draw took place
|
||||||
for (i = 0; i < cursorIds.length; i++) {
|
for (i = 0; i < cursorIds.length; i++) {
|
||||||
$tr = $table.find("tr[id="+cursorIds[i]+"][si_id="+showInstanceIds[i]+"]");
|
$tr = $table.find("tr[id="+cursorIds[i]+"][si_id="+showInstanceIds[i]+"]");
|
||||||
mod.selectCursor($tr);
|
|
||||||
|
/* If the currently playing track's cursor is selected,
|
||||||
|
* and that track is deleted, the cursor position becomes
|
||||||
|
* unavailble. We have to check the position is available
|
||||||
|
* before re-highlighting it.
|
||||||
|
*/
|
||||||
|
if ($tr.find(".sb-checkbox").children().hasClass("innerWrapper")) {
|
||||||
|
mod.selectCursor($tr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if there is only 1 cursor on the page highlight it by default.
|
//if there is only 1 cursor on the page highlight it by default.
|
||||||
|
@ -894,7 +902,7 @@ var AIRTIME = (function(AIRTIME){
|
||||||
|
|
||||||
return draggingContainer;
|
return draggingContainer;
|
||||||
},
|
},
|
||||||
items: 'tr:not(:first, :last, .sb-header, .sb-not-allowed, .sb-past, .sb-now-playing)',
|
items: 'tr:not(:first, :last, .sb-header, .sb-not-allowed, .sb-past, .sb-now-playing, .sb-empty)',
|
||||||
cancel: '.sb-footer',
|
cancel: '.sb-footer',
|
||||||
receive: fnReceive,
|
receive: fnReceive,
|
||||||
update: fnUpdate,
|
update: fnUpdate,
|
||||||
|
|
|
@ -497,16 +497,15 @@ class PypoFetch(Thread):
|
||||||
self.handle_message(message)
|
self.handle_message(message)
|
||||||
except Empty, e:
|
except Empty, e:
|
||||||
self.logger.info("Queue timeout. Fetching schedule manually")
|
self.logger.info("Queue timeout. Fetching schedule manually")
|
||||||
|
success, self.schedule_data = self.api_client.get_schedule()
|
||||||
|
if success:
|
||||||
|
self.process_schedule(self.schedule_data)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
import traceback
|
import traceback
|
||||||
top = traceback.format_exc()
|
top = traceback.format_exc()
|
||||||
self.logger.error('Exception: %s', e)
|
self.logger.error('Exception: %s', e)
|
||||||
self.logger.error("traceback: %s", top)
|
self.logger.error("traceback: %s", top)
|
||||||
|
|
||||||
success, self.schedule_data = self.api_client.get_schedule()
|
|
||||||
if success:
|
|
||||||
self.process_schedule(self.schedule_data)
|
|
||||||
|
|
||||||
loops += 1
|
loops += 1
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in New Issue