Merge branch '2.1.x' into devel

Conflicts:
	airtime_mvc/application/controllers/ApiController.php
This commit is contained in:
denise 2012-07-03 10:42:29 -04:00
commit 3e75b28c9d
6 changed files with 27 additions and 15 deletions

View File

@ -43,7 +43,7 @@ $ccAcl->allow('G', 'index')
->allow('A', 'playouthistory')
->allow('A', 'user')
->allow('A', 'systemstatus')
->allow('A', 'preference', 'admin');
->allow('A', 'preference');
$aclPlugin = new Zend_Controller_Plugin_Acl($ccAcl);

View File

@ -136,9 +136,10 @@ class ApiController extends Zend_Controller_Action
*/
if (!$file_base_name) {
$file_base_name = $full_path;
}
$file_base_name = substr($file_base_name, 1);
} else {
$file_base_name = substr($file_base_name, 1);
}
// possibly use fileinfo module here in the future.
// http://www.php.net/manual/en/book.fileinfo.php
$ext = pathinfo($fileID, PATHINFO_EXTENSION);

View File

@ -35,14 +35,20 @@ class Logging {
}
public static function log($p_msg){
$bt = debug_backtrace();
$caller = array_shift($bt);
$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){
$bt = debug_backtrace();
$caller = array_shift($bt);
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
$logger = self::getLogger();
$logger->debug(self::toString($p_msg));
$logger->debug(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
}
}
}

View File

@ -221,7 +221,6 @@ class Application_Model_ShowBuilder {
$row["title"] = $p_item["show_name"];
$row["instance"] = intval($p_item["si_id"]);
$row["image"] = '';
$row["id"] = -1;
$this->getScheduledStatus($startsEpoch, $endsEpoch, $row);
@ -311,7 +310,6 @@ class Application_Model_ShowBuilder {
$row = $this->defaultRowArray;
$row["footer"] = true;
$row["instance"] = intval($p_item["si_id"]);
$row["id"] = -1;
$this->getRowTimestamp($p_item, $row);
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));

View File

@ -589,7 +589,7 @@ var AIRTIME = (function(AIRTIME){
$nRow.addClass("sb-future");
}
if (aData.allowed !== true || aData.header === true) {
if (aData.allowed !== true) {
$nRow.addClass("sb-not-allowed");
}
else {
@ -679,7 +679,15 @@ var AIRTIME = (function(AIRTIME){
//re-highlight selected cursors before draw took place
for (i = 0; i < cursorIds.length; 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.
@ -894,7 +902,7 @@ var AIRTIME = (function(AIRTIME){
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',
receive: fnReceive,
update: fnUpdate,

View File

@ -497,16 +497,15 @@ class PypoFetch(Thread):
self.handle_message(message)
except Empty, e:
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:
import traceback
top = traceback.format_exc()
self.logger.error('Exception: %s', e)
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
def run(self):