Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
201e649014
|
@ -339,7 +339,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
return false;
|
||||
}
|
||||
|
||||
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER) && $user->isHostOfShow($show->getShowId())))
|
||||
if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)) || $user->isHostOfShow($show->getShowId()))
|
||||
$show->clearShow();
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER) && $user->isHostOfShow($show->getShowId()))) {
|
||||
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)) || $user->isHostOfShow($show->getShowId())) {
|
||||
$show->removeGroupFromShow($group_id);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,9 @@ class Application_Model_Datatables
|
|||
if ($dbname == 'utime' || $dbname == 'mtime') {
|
||||
$input1 = isset($info[0])?Application_Common_DateHelper::ConvertToUtcDateTimeString($info[0]):null;
|
||||
$input2 = isset($info[1])?Application_Common_DateHelper::ConvertToUtcDateTimeString($info[1]):null;
|
||||
} else if($dbname == 'bit_rate') {
|
||||
$input1 = isset($info[0])?intval($info[0]) * 1000:null;
|
||||
$input2 = isset($info[1])?intval($info[1]) * 1000:null;
|
||||
} else {
|
||||
$input1 = isset($info[0])?$info[0]:null;
|
||||
$input2 = isset($info[1])?$info[1]:null;
|
||||
|
|
|
@ -172,20 +172,21 @@ class Application_Model_Schedule
|
|||
public static function GetLastScheduleItem($p_timeNow)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$sql = "SELECT"
|
||||
." ft.artist_name, ft.track_title,"
|
||||
." st.starts as starts, st.ends as ends"
|
||||
." FROM $CC_CONFIG[scheduleTable] st"
|
||||
." LEFT JOIN $CC_CONFIG[filesTable] ft"
|
||||
." ON st.file_id = ft.id"
|
||||
." LEFT JOIN $CC_CONFIG[showInstances] sit"
|
||||
." ON st.instance_id = sit.id"
|
||||
." WHERE st.ends < TIMESTAMP :timeNow"
|
||||
." AND st.starts >= sit.starts" //this and the next line are necessary since we can overbook shows.
|
||||
." AND st.starts < sit.ends"
|
||||
." ORDER BY st.ends DESC"
|
||||
." LIMIT 1";
|
||||
$sql = <<<SQL
|
||||
SELECT ft.artist_name,
|
||||
ft.track_title,
|
||||
st.starts AS starts,
|
||||
st.ends AS ends
|
||||
FROM $CC_CONFIG[scheduleTable] st
|
||||
LEFT JOIN $CC_CONFIG[filesTable] ft ON st.file_id = ft.id
|
||||
LEFT JOIN $CC_CONFIG[showInstances] sit ON st.instance_id = sit.id
|
||||
-- this and the next line are necessary since we can overbook shows.
|
||||
WHERE st.ends < TIMESTAMP :timeNow
|
||||
|
||||
AND st.starts >= sit.starts
|
||||
AND st.starts < sit.ends
|
||||
ORDER BY st.ends DESC LIMIT 1;
|
||||
SQL;
|
||||
$row = Application_Common_Database::prepareAndExecute($sql, array(':timeNow'=>$p_timeNow));
|
||||
|
||||
return $row;
|
||||
|
|
|
@ -416,7 +416,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
/* Language */ { "sTitle" : "Language" , "mDataProp" : "language" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" } ,
|
||||
/* Owner */ { "sTitle" : "Owner" , "mDataProp" : "owner" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" } ,
|
||||
/* Conductor */ { "sTitle" : "Conductor" , "mDataProp" : "conductor" , "bVisible" : false , "sClass" : "library_conductor" , "sWidth" : "125px" },
|
||||
/* Replay Gain */ { "sTitle" : "Replay Gain" , "mDataProp" : "replay_gain" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" }
|
||||
/* Replay Gain */ { "sTitle" : "Replay Gain" , "mDataProp" : "replay_gain" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "80px" }
|
||||
],
|
||||
|
||||
"bProcessing": true,
|
||||
|
|
Loading…
Reference in New Issue