Formatted Block.php
This commit is contained in:
parent
7b41d94352
commit
d69391d2dd
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue