CC-4384: Remove annoying usage of $CC_CONFIG
- done
This commit is contained in:
parent
a55bc9973c
commit
5a97fb69f2
30 changed files with 84 additions and 78 deletions
|
@ -189,7 +189,7 @@ SQL;
|
|||
->find($con);
|
||||
|
||||
/* Check two things:
|
||||
1. If the show being resized and any of its repeats end in the past
|
||||
1. If the show being resized and any of its repeats end in the past
|
||||
2. If the show being resized and any of its repeats overlap
|
||||
with other scheduled shows */
|
||||
|
||||
|
@ -321,7 +321,7 @@ SQL;
|
|||
} catch (Exception $e) {
|
||||
Logging::info($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Application_Model_RabbitMq::PushSchedule();
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ SQL;
|
|||
$startDateTime = new DateTime($show["starts"], $utc);
|
||||
$startDateTime->setTimezone($dtz);
|
||||
|
||||
$rebroadcastsLocal[$i]["start_date"] =
|
||||
$rebroadcastsLocal[$i]["start_date"] =
|
||||
$startDateTime->format("Y-m-d");
|
||||
$rebroadcastsLocal[$i]["start_time"] =
|
||||
$startDateTime->format("H:i");
|
||||
|
@ -533,7 +533,7 @@ SQL;
|
|||
->filterByDbShowId($this->_showId)
|
||||
->findOne();
|
||||
|
||||
if (!is_null($showDaysRow))
|
||||
if (!is_null($showDaysRow))
|
||||
return $showDaysRow->getDbRepeatType();
|
||||
else
|
||||
return -1;
|
||||
|
@ -582,7 +582,7 @@ WHERE starts > :timestamp::TIMESTAMP
|
|||
AND show_id = :showId
|
||||
SQL;
|
||||
Application_Common_Database::prepareAndExecute( $sql,
|
||||
array( ':timestamp' => gmdate("Y-m-d H:i:s"),
|
||||
array( ':timestamp' => gmdate("Y-m-d H:i:s"),
|
||||
':showId' => $this->getId()), 'execute');
|
||||
}
|
||||
|
||||
|
@ -838,7 +838,7 @@ WHERE show_id = :show_id
|
|||
AND ends > :timestamp::TIMESTAMP
|
||||
SQL;
|
||||
|
||||
Application_Common_Database::prepareAndExecute( $sql, array(
|
||||
Application_Common_Database::prepareAndExecute( $sql, array(
|
||||
':add_show_duration' => $p_data['add_show_duration'],
|
||||
':show_id' => $p_data['add_show_id'],
|
||||
':timestamp' => $timestamp), "execute");
|
||||
|
@ -1222,12 +1222,12 @@ SQL;
|
|||
SELECT :rebroadcast::date - :start::date
|
||||
SQL;
|
||||
|
||||
$offset_days =
|
||||
$offset_days =
|
||||
Application_Common_Database::prepareAndExecute($sql,
|
||||
array(
|
||||
'rebroadcast' =>
|
||||
'rebroadcast' =>
|
||||
$data["add_show_rebroadcast_date_absolute_$i"],
|
||||
'start' =>
|
||||
'start' =>
|
||||
$data['add_show_start_date']), "column" );
|
||||
|
||||
//$r = $con->query($sql);
|
||||
|
@ -1770,7 +1770,7 @@ SQL;
|
|||
$parentStartsEpoch = intval($parentStartsDT->format("U"));
|
||||
}
|
||||
|
||||
$startsDT = DateTime::createFromFormat("Y-m-d G:i:s",
|
||||
$startsDT = DateTime::createFromFormat("Y-m-d G:i:s",
|
||||
$show["starts"],$utc);
|
||||
$endsDT = DateTime::createFromFormat("Y-m-d G:i:s",
|
||||
$show["ends"], $utc);
|
||||
|
@ -1907,7 +1907,7 @@ SQL;
|
|||
*/
|
||||
public static function getCurrentShow($timeNow=null)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$con = Propel::getConnection();
|
||||
if ($timeNow == null) {
|
||||
$date = new Application_Common_DateHelper;
|
||||
|
@ -1953,7 +1953,7 @@ SQL;
|
|||
*/
|
||||
public static function getPrevCurrentNext($p_timeNow)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
$con = Propel::getConnection();
|
||||
//
|
||||
//TODO, returning starts + ends twice (once with an alias). Unify this after the 2.0 release. --Martin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue