Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
James 2013-01-07 13:49:09 -05:00
commit 51425d451f
4 changed files with 29 additions and 0 deletions

View file

@ -1801,6 +1801,8 @@ SQL;
$options["show_empty"] = (array_key_exists($show['instance_id'],
$content_count)) ? 0 : 1;
$options["show_partial_filled"] = $showInstance->showPartialFilled();
$events[] = &self::makeFullCalendarEvent($show, $options,
$startsDT, $endsDT, $startsEpochStr, $endsEpochStr);

View file

@ -687,6 +687,22 @@ SQL;
}
public function showPartialFilled()
{
$sql = <<<SQL
SELECT time_filled > '00:00:00'
AND time_filled < ends - starts
AND file_id IS null AS partial_filled
FROM cc_show_instances
WHERE id = :instance_id
SQL;
$res = Application_Common_Database::prepareAndExecute($sql,
array(':instance_id' => $this->_instanceId), 'all');
return $res[0]["partial_filled"];
}
public function showEmpty()
{
$sql = <<<SQL