Remvod unused CC_CONFIG, reformatted some code

This commit is contained in:
Rudi Grinberg 2012-09-13 10:26:50 -04:00
parent 0df0c41012
commit 24b3fb7e8a
2 changed files with 6 additions and 5 deletions

View File

@ -210,7 +210,7 @@ FROM cc_blockcontents AS pc
LEFT JOIN cc_files AS f ON pc.file_id=f.id
LEFT JOIN cc_block AS bl ON pc.block_id = bl.id
WHERE pc.block_id = :block_id
ORDER BY pc.position;
ORDER BY pc.position
SQL;
$rows = Application_Common_Database::prepareAndExecute($sql, array(':block_id'=>$this->id));

View File

@ -522,7 +522,6 @@ SQL;
*/
public static function getItems($p_startTime, $p_endTime)
{
global $CC_CONFIG;
$baseQuery = <<<SQL
SELECT st.file_id AS file_id,
st.id AS id,
@ -556,8 +555,10 @@ SQL;
$sql = $baseQuery." ".$predicates;
$rows = Application_Common_Database::prepareAndExecute($sql,
array(':startTime1'=>$p_startTime, ':endTime'=>$p_endTime, ':startTime2'=>$p_startTime));
$rows = Application_Common_Database::prepareAndExecute($sql, array(
':startTime1' => $p_startTime,
':endTime' => $p_endTime,
':startTime2' => $p_startTime));
if (count($rows) < 3) {
$dt = new DateTime("@".time());
@ -572,7 +573,7 @@ WHERE st.ends > :startTime1
ORDER BY st.starts LIMIT 3
SQL;
$sql = " ".$baseQuery." ".$predicates." ";
$sql = $baseQuery." ".$predicates." ";
$rows = Application_Common_Database::prepareAndExecute($sql,
array(
':startTime1' => $p_startTime,