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;
|
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();
|
$show->clearShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
return false;
|
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);
|
$show->removeGroupFromShow($group_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,9 @@ class Application_Model_Datatables
|
||||||
if ($dbname == 'utime' || $dbname == 'mtime') {
|
if ($dbname == 'utime' || $dbname == 'mtime') {
|
||||||
$input1 = isset($info[0])?Application_Common_DateHelper::ConvertToUtcDateTimeString($info[0]):null;
|
$input1 = isset($info[0])?Application_Common_DateHelper::ConvertToUtcDateTimeString($info[0]):null;
|
||||||
$input2 = isset($info[1])?Application_Common_DateHelper::ConvertToUtcDateTimeString($info[1]):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 {
|
} else {
|
||||||
$input1 = isset($info[0])?$info[0]:null;
|
$input1 = isset($info[0])?$info[0]:null;
|
||||||
$input2 = isset($info[1])?$info[1]:null;
|
$input2 = isset($info[1])?$info[1]:null;
|
||||||
|
|
|
@ -172,20 +172,21 @@ class Application_Model_Schedule
|
||||||
public static function GetLastScheduleItem($p_timeNow)
|
public static function GetLastScheduleItem($p_timeNow)
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$sql = "SELECT"
|
$sql = <<<SQL
|
||||||
." ft.artist_name, ft.track_title,"
|
SELECT ft.artist_name,
|
||||||
." st.starts as starts, st.ends as ends"
|
ft.track_title,
|
||||||
." FROM $CC_CONFIG[scheduleTable] st"
|
st.starts AS starts,
|
||||||
." LEFT JOIN $CC_CONFIG[filesTable] ft"
|
st.ends AS ends
|
||||||
." ON st.file_id = ft.id"
|
FROM $CC_CONFIG[scheduleTable] st
|
||||||
." LEFT JOIN $CC_CONFIG[showInstances] sit"
|
LEFT JOIN $CC_CONFIG[filesTable] ft ON st.file_id = ft.id
|
||||||
." ON st.instance_id = sit.id"
|
LEFT JOIN $CC_CONFIG[showInstances] sit ON st.instance_id = sit.id
|
||||||
." WHERE st.ends < TIMESTAMP :timeNow"
|
-- this and the next line are necessary since we can overbook shows.
|
||||||
." AND st.starts >= sit.starts" //this and the next line are necessary since we can overbook shows.
|
WHERE st.ends < TIMESTAMP :timeNow
|
||||||
." AND st.starts < sit.ends"
|
|
||||||
." ORDER BY st.ends DESC"
|
|
||||||
." LIMIT 1";
|
|
||||||
|
|
||||||
|
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));
|
$row = Application_Common_Database::prepareAndExecute($sql, array(':timeNow'=>$p_timeNow));
|
||||||
|
|
||||||
return $row;
|
return $row;
|
||||||
|
|
|
@ -416,7 +416,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
/* Language */ { "sTitle" : "Language" , "mDataProp" : "language" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" } ,
|
/* Language */ { "sTitle" : "Language" , "mDataProp" : "language" , "bVisible" : false , "sClass" : "library_language" , "sWidth" : "125px" } ,
|
||||||
/* Owner */ { "sTitle" : "Owner" , "mDataProp" : "owner" , "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" },
|
/* 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,
|
"bProcessing": true,
|
||||||
|
|
Loading…
Reference in New Issue