Merge branch '2.1.x' into devel
This commit is contained in:
commit
f33485f8ea
|
@ -5,11 +5,12 @@ class Logging {
|
|||
private static $_logger;
|
||||
private static $_path;
|
||||
|
||||
public static function getLogger(){
|
||||
public static function getLogger()
|
||||
{
|
||||
if (!isset(self::$_logger)) {
|
||||
$writer = new Zend_Log_Writer_Stream(self::$_path);
|
||||
|
||||
if (Zend_Version::compareVersion("1.11") > 0){
|
||||
if (Zend_Version::compareVersion("1.11") > 0) {
|
||||
//Running Zend version 1.10 or lower. Need to instantiate our
|
||||
//own Zend Log class with backported code from 1.11.
|
||||
require_once __DIR__."/AirtimeLog.php";
|
||||
|
@ -22,33 +23,50 @@ class Logging {
|
|||
return self::$_logger;
|
||||
}
|
||||
|
||||
public static function setLogPath($path){
|
||||
public static function setLogPath($path)
|
||||
{
|
||||
self::$_path = $path;
|
||||
}
|
||||
|
||||
public static function toString($p_msg){
|
||||
if (is_array($p_msg) || is_object($p_msg)){
|
||||
public static function toString($p_msg)
|
||||
{
|
||||
if (is_array($p_msg) || is_object($p_msg)) {
|
||||
return print_r($p_msg, true);
|
||||
} else {
|
||||
return $p_msg;
|
||||
}
|
||||
}
|
||||
|
||||
public static function log($p_msg){
|
||||
public static function log($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
$logger = self::getLogger();
|
||||
$logger->info(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
|
||||
$logger->info("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||
}
|
||||
|
||||
public static function debug($p_msg){
|
||||
public static function debug($p_msg)
|
||||
{
|
||||
$bt = debug_backtrace();
|
||||
|
||||
$caller = array_shift($bt);
|
||||
$file = basename($caller['file']);
|
||||
$line = $caller['line'];
|
||||
|
||||
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development"){
|
||||
$caller = array_shift($bt);
|
||||
$function = $caller['function'];
|
||||
|
||||
|
||||
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development") {
|
||||
$logger = self::getLogger();
|
||||
$logger->debug(self::toString($p_msg)." - file:".$caller['file'].":".$caller['line']);
|
||||
$logger->debug("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1646,6 +1646,15 @@ class Application_Model_Show
|
|||
} elseif ($p_editable && $nowEpoch < $endsEpoch) {
|
||||
$options["editable"] = true;
|
||||
}
|
||||
|
||||
$showInstance = new Application_Model_ShowInstance($show["instance_id"]);
|
||||
$showContent = $showInstance->getShowListContent();
|
||||
if (empty($showContent)) {
|
||||
$options["show_empty"] = 1;
|
||||
} else {
|
||||
$options["show_empty"] = 0;
|
||||
}
|
||||
|
||||
$events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
|
||||
}
|
||||
|
||||
|
|
|
@ -1882,17 +1882,21 @@ span.errors.sp-errors{
|
|||
}
|
||||
.small-icon.recording {
|
||||
background:url(images/icon_record.png) no-repeat 0 0;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.small-icon.rebroadcast {
|
||||
background:url(images/icon_rebroadcast.png) no-repeat 0 0;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.small-icon.soundcloud {
|
||||
background:url(images/icon_soundcloud.png) no-repeat 0 0;
|
||||
width:21px;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.small-icon.sc-error {
|
||||
background:url(images/icon_soundcloud_error2.png) no-repeat 0 0;
|
||||
width:21px;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.small-icon.now-playing {
|
||||
background:url(images/icon_nowplaying_n.png) no-repeat 0 0;
|
||||
|
@ -1905,6 +1909,7 @@ span.errors.sp-errors{
|
|||
border-radius:2px;
|
||||
-webkit-border-radius:2px;
|
||||
-moz-border-radius:2px;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.small-icon.alert {
|
||||
background:url(images/icon_alert.png) no-repeat;
|
||||
|
@ -1913,6 +1918,11 @@ span.errors.sp-errors{
|
|||
margin-right:3px;
|
||||
margin-left:1px;
|
||||
}
|
||||
.small-icon.show-empty {
|
||||
background:url(redmond/images/ui-icons_ff5d1a_256x240.png) no-repeat 0 -144px;
|
||||
width: 16px;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
.medium-icon {
|
||||
display:block;
|
||||
width:25px;
|
||||
|
|
|
@ -253,6 +253,33 @@ function eventRender(event, element, view) {
|
|||
} else if (view.name === 'month' && event.record === 1 && event.soundcloud_id === -3) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon recording"></span><span id="'+event.id+'" class="small-icon sc-error"></span>');
|
||||
}
|
||||
|
||||
//add scheduled show content empty icon
|
||||
if (view.name === 'agendaDay' || view.name === 'agendaWeek') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
if (event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-time").before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
|
||||
}
|
||||
}
|
||||
} else if (view.name === 'month') {
|
||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||
if (event.soundcloud_id === -1) {
|
||||
$(element).find(".fc-event-title").after('<span id="'+event.id+'" class="small-icon show-empty"></span>');
|
||||
} else if (event.soundcloud_id > 0) {
|
||||
|
||||
} else if (event.soundcloud_id === -2) {
|
||||
|
||||
} else if (event.soundcloud_id === -3) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//rebroadcast icon
|
||||
if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.rebroadcast === 1) {
|
||||
|
@ -460,6 +487,24 @@ function addQtipToSCIcons(ele){
|
|||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}else if ($(ele).hasClass("show-empty")){
|
||||
$(ele).qtip({
|
||||
content: {
|
||||
text: "This show has no scheduled content."
|
||||
},
|
||||
position:{
|
||||
adjust: {
|
||||
resize: true,
|
||||
method: "flip flip"
|
||||
},
|
||||
at: "right center",
|
||||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,13 @@ try:
|
|||
liq_path = p.communicate()[0].strip()
|
||||
|
||||
if p.returncode == 0:
|
||||
try:
|
||||
os.unlink(liq_path)
|
||||
except Exception:
|
||||
#liq_path DNE, which is OK.
|
||||
pass
|
||||
|
||||
|
||||
os.symlink(liq_path, "/usr/bin/airtime-liquidsoap")
|
||||
else:
|
||||
print " * Liquidsoap binary not found!"
|
||||
|
|
Loading…
Reference in New Issue