Merge branch '1.8.2' into devel

Conflicts:
	airtime_mvc/application/models/Dashboard.php
	python_apps/media-monitor/airtime-media-monitor-start
	python_apps/pypo/airtime-pypo-start
	python_apps/show-recorder/airtime-show-recorder-start
This commit is contained in:
martin 2011-06-03 17:29:55 -04:00
commit 1540e593e4
12 changed files with 287 additions and 195 deletions

View file

@ -394,7 +394,7 @@ class Schedule {
}
public static function GetCurrentScheduleItem($p_timeNow){
public static function GetCurrentScheduleItem($p_timeNow, $p_instanceId){
global $CC_CONFIG, $CC_DBC;
/* Note that usually there will be one result returned. In some
@ -409,6 +409,7 @@ class Schedule {
." LEFT JOIN $CC_CONFIG[filesTable] ft"
." ON st.file_id = ft.id"
." WHERE st.starts <= TIMESTAMP '$p_timeNow'"
." AND st.instance_id = $p_instanceId"
." AND st.ends > TIMESTAMP '$p_timeNow'"
." ORDER BY st.starts DESC"
." LIMIT 1";
@ -733,5 +734,37 @@ class Schedule {
global $CC_CONFIG, $CC_DBC;
$CC_DBC->query("TRUNCATE TABLE ".$CC_CONFIG["scheduleTable"]);
}
public static function createNewFormSections($p_view){
$formWhat = new Application_Form_AddShowWhat();
$formWho = new Application_Form_AddShowWho();
$formWhen = new Application_Form_AddShowWhen();
$formRepeats = new Application_Form_AddShowRepeats();
$formStyle = new Application_Form_AddShowStyle();
$formRecord = new Application_Form_AddShowRR();
$formAbsoluteRebroadcast = new Application_Form_AddShowAbsoluteRebroadcastDates();
$formRebroadcast = new Application_Form_AddShowRebroadcastDates();
$formWhat->removeDecorator('DtDdWrapper');
$formWho->removeDecorator('DtDdWrapper');
$formWhen->removeDecorator('DtDdWrapper');
$formRepeats->removeDecorator('DtDdWrapper');
$formStyle->removeDecorator('DtDdWrapper');
$formRecord->removeDecorator('DtDdWrapper');
$formAbsoluteRebroadcast->removeDecorator('DtDdWrapper');
$formRebroadcast->removeDecorator('DtDdWrapper');
$p_view->what = $formWhat;
$p_view->when = $formWhen;
$p_view->repeats = $formRepeats;
$p_view->who = $formWho;
$p_view->style = $formStyle;
$p_view->rr = $formRecord;
$p_view->absoluteRebroadcast = $formAbsoluteRebroadcast;
$p_view->rebroadcast = $formRebroadcast;
$p_view->addNewShow = true;
$formWhat->populate(array('add_show_id' => '-1'));
}
}