Formatted Block.php

This commit is contained in:
Rudi Grinberg 2012-09-12 11:35:28 -04:00
parent 7b41d94352
commit d69391d2dd
1 changed files with 23 additions and 25 deletions

View File

@ -337,10 +337,12 @@ EOT;
// this function returns sum of all track length under this block.
public function getStaticLength()
{
$sql = "SELECT SUM(cliplength) as length FROM cc_blockcontents WHERE block_id = :block_id";
$sql = <<<SQL
SELECT SUM(cliplength) AS LENGTH
FROM cc_blockcontents
WHERE block_id = :block_id
SQL;
$result = Application_Common_Database::prepareAndExecute($sql, array(':block_id'=>$this->id), 'all', PDO::FETCH_NUM);
//Logging::info($result);
return $result[0][0];
}
@ -1052,11 +1054,7 @@ EOT;
public function hasItemLimit()
{
list($value, $modifier) = $this->getLimitValueAndModifier();
if ($modifier == 'items') {
return true;
} else {
return false;
}
return ($modifier == 'items');
}
public function storeCriteriaIntoDb($p_criteriaData)