Merge branch '2.0.x' into devel

Conflicts:
	VERSION
	airtime_mvc/application/models/Schedule.php
	airtime_mvc/application/models/Show.php
	airtime_mvc/public/js/airtime/dashboard/helperfunctions.js
	install_minimal/include/airtime-constants.php
	python_apps/api_clients/api_client.py
	python_apps/pypo/pypocli.py
	python_apps/pypo/pypofetch.py
This commit is contained in:
Martin Konecny 2012-03-12 17:52:17 -04:00
commit 6f270bfb3d
21 changed files with 1664 additions and 293 deletions

View file

@ -677,20 +677,22 @@ class Application_Model_ShowInstance {
return $results;
}
public static function GetShowsInstancesIdsInRange($p_timeNow, $p_start, $p_end)
public static function GetShowsInstancesIdsInRange($p_start, $p_end)
{
global $CC_DBC;
$sql = "SELECT id FROM cc_show_instances AS si "
."WHERE modified_instance != TRUE AND ("
."(si.starts < TIMESTAMP '$p_timeNow' - INTERVAL '$p_start seconds' "
."AND si.ends > TIMESTAMP '$p_timeNow' - INTERVAL '$p_start seconds') "
."OR (si.starts > TIMESTAMP '$p_timeNow' - INTERVAL '$p_start seconds' "
."AND si.ends < TIMESTAMP '$p_timeNow' + INTERVAL '$p_end seconds') "
."OR (si.starts < TIMESTAMP '$p_timeNow' + INTERVAL '$p_end seconds' "
."AND si.ends > TIMESTAMP '$p_timeNow' + INTERVAL '$p_end seconds') "
."(si.starts < TIMESTAMP '$p_start'"
."AND si.ends > TIMESTAMP '$p_start') "
."OR (si.starts > TIMESTAMP '$p_start' "
."AND si.ends < TIMESTAMP '$p_end') "
."OR (si.starts < TIMESTAMP '$p_end' "
."AND si.ends > TIMESTAMP '$p_end') "
.") "
." ORDER BY si.starts";
Logging::debug($sql);
$rows = $CC_DBC->GetAll($sql);
return $rows;
@ -732,7 +734,7 @@ class Application_Model_ShowInstance {
return $CC_DBC->GetAll($sql);
}
public function getLastAudioItemEnd(){
global $CC_DBC;