Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
1a29499bb8
8 changed files with 358 additions and 296 deletions
|
@ -344,12 +344,12 @@ SELECT showt.name AS show_name,
|
|||
JOIN cc_show AS showt ON (showt.id = si.show_id)
|
||||
WHERE si.modified_instance = FALSE
|
||||
$showPredicate
|
||||
AND (si.starts >= '{$p_start}'
|
||||
AND ((si.starts >= '{$p_start}'
|
||||
AND si.starts < '{$p_end}')
|
||||
OR (si.ends > '{$p_start}'
|
||||
AND si.ends <= '{$p_end}')
|
||||
OR (si.starts <= '{$p_start}'
|
||||
AND si.ends >= '{$p_end}')
|
||||
AND si.ends >= '{$p_end}'))
|
||||
ORDER BY si_starts,
|
||||
sched_starts;
|
||||
SQL;
|
||||
|
|
|
@ -35,7 +35,6 @@ class Application_Model_User
|
|||
public function isHostOfShow($showId)
|
||||
{
|
||||
$userId = $this->_userInstance->getDbId();
|
||||
|
||||
return CcShowHostsQuery::create()
|
||||
->filterByDbShow($showId)
|
||||
->filterByDbHost($userId)->count() > 0;
|
||||
|
@ -63,10 +62,9 @@ class Application_Model_User
|
|||
|
||||
if ($type === UTYPE_ADMIN ||
|
||||
$type === UTYPE_PROGRAM_MANAGER ||
|
||||
CcShowHostsQuery::create()->filterByDbShow($p_showId)->filterByDbHost($this->getId())->count() > 0) {
|
||||
self::isHostOfShow($p_showId)) {
|
||||
$result = true;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -210,7 +208,7 @@ class Application_Model_User
|
|||
$this->_userInstance->delete();
|
||||
}
|
||||
}
|
||||
public function getOwnedFiles()
|
||||
public function getOwnedFiles()
|
||||
{
|
||||
$user = $this->_userInstance;
|
||||
// do we need a find call at the end here?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue