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

This commit is contained in:
Rudi Grinberg 2012-09-17 15:48:09 -04:00
commit 1a29499bb8
8 changed files with 358 additions and 296 deletions

View file

@ -25,9 +25,7 @@ class DashboardController extends Zend_Controller_Action
$user = new Application_Model_User($userInfo->id);
$show = Application_Model_Show::getCurrentShow();
$show_id = isset($show['id'])?$show['id']:0;
$show_id = isset($show[0]['id'])?$show[0]['id']:0;
$source_connected = Application_Model_Preference::GetSourceStatus($sourcename);
if ($user->canSchedule($show_id) && $source_connected) {

View file

@ -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;

View file

@ -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?

View file

@ -35,9 +35,15 @@ if ($item['type'] == 2) {
<span class="spl_cue ui-state-default"></span>
<?php } else if ($item['type'] == 2) {
if ($staticBlock) {?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">Static Block Expand</span>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Static Block
</span>
<?php } else { ?>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">Dynamic Block</span>
<span class="spl_block_expand close" blockId="<?php echo $item["item_id"]; ?>" id="expand_block_<?php echo $item["id"]?>">
<span class="ui-icon ui-icon-triangle-2-n-s"></span>
Expand Dynamic Block
</span>
<?php }
} ?>
<span class="spl_title"><?php echo $item['track_title'] ?></span>
@ -79,7 +85,7 @@ if ($item['type'] == 2) {
</div>
<?php endif; ?>
<?php if ($item['type'] == 2) {?>
<div id="block_<?php echo $item["id"]?>_info"></div>
<ul style='display:none' id="block_<?php echo $item["id"]?>_info" class="smart-block-info"></ul>
<?php } ?>
</li>
<?php $i = $i+1; ?>