CC-4413: Unused local variables in models.

-done
This commit is contained in:
denise 2012-09-12 17:26:41 -04:00
parent 8938eaa637
commit 3b43efefe0
9 changed files with 3 additions and 29 deletions

View file

@ -190,7 +190,6 @@ class Application_Model_Block implements Application_Model_LibraryEditable
{ {
Logging::info("Getting contents for block {$this->id}"); Logging::info("Getting contents for block {$this->id}");
$files = array();
$sql = <<<SQL $sql = <<<SQL
SELECT pc.id AS id, SELECT pc.id AS id,
pc.position, pc.position,
@ -640,8 +639,6 @@ SQL;
$this->con->beginTransaction(); $this->con->beginTransaction();
$errArray= array();
try { try {
$row = CcBlockcontentsQuery::create()->findPK($id); $row = CcBlockcontentsQuery::create()->findPK($id);
@ -1030,8 +1027,7 @@ SQL;
$blockType = $data['etc']['sp_type'] == 0 ? 'static':'dynamic'; $blockType = $data['etc']['sp_type'] == 0 ? 'static':'dynamic';
$this->saveType($blockType); $this->saveType($blockType);
$this->storeCriteriaIntoDb($data); $this->storeCriteriaIntoDb($data);
//get number of files that meet the criteria
$files = $this->getListofFilesMeetCriteria();
// if the block is dynamic, put null to the length // if the block is dynamic, put null to the length
// as it cannot be calculated // as it cannot be calculated
if ($blockType == 'dynamic') { if ($blockType == 'dynamic') {
@ -1360,7 +1356,6 @@ SQL;
} }
if (in_array($fieldName, $fieldNames)) { if (in_array($fieldName, $fieldNames)) {
$rowNum = intval(substr($ele['name'], $index+1));
$output['criteria'][$critIndex][$lastChar][$fieldName] = trim($ele['value']); $output['criteria'][$critIndex][$lastChar][$fieldName] = trim($ele['value']);
} else { } else {
$output['etc'][$ele['name']] = $ele['value']; $output['etc'][$ele['name']] = $ele['value'];

View file

@ -116,7 +116,6 @@ class Application_Model_Datatables
$simpleWhere = array(); $simpleWhere = array();
foreach ($searchTerms as $term) { foreach ($searchTerms as $term) {
$innerCond = array();
foreach ($searchCols as $col) { foreach ($searchCols as $col) {
$simpleWhere['clause']["simple_".$col] = "{$col}::text ILIKE :simple_".$col; $simpleWhere['clause']["simple_".$col] = "{$col}::text ILIKE :simple_".$col;

View file

@ -20,7 +20,7 @@ class Application_Model_Email
$mailServer = Application_Model_Preference::GetMailServer(); $mailServer = Application_Model_Preference::GetMailServer();
$mailServerPort = Application_Model_Preference::GetMailServerPort(); $mailServerPort = Application_Model_Preference::GetMailServerPort();
if (!empty($mailServerPort)) { if (!empty($mailServerPort)) {
$port = Application_Model_Preference::GetMailServerPort(); $port = $mailServerPort;
} }
if ($mailServerRequiresAuth) { if ($mailServerRequiresAuth) {

View file

@ -75,7 +75,6 @@ class Application_Model_MusicDir
*/ */
public function remove($userAddedWatchedDir=true) public function remove($userAddedWatchedDir=true)
{ {
$con = Propel::getConnection();
$music_dir_id = $this->getId(); $music_dir_id = $this->getId();

View file

@ -154,7 +154,6 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
public function getContents($filterFiles=false) public function getContents($filterFiles=false)
{ {
Logging::info("Getting contents for playlist {$this->id}"); Logging::info("Getting contents for playlist {$this->id}");
$files = array();
$sql = <<<SQL $sql = <<<SQL
SELECT * SELECT *
@ -614,8 +613,6 @@ SQL;
$this->con->beginTransaction(); $this->con->beginTransaction();
$errArray= array();
try { try {
$row = CcPlaylistcontentsQuery::create()->findPK($id); $row = CcPlaylistcontentsQuery::create()->findPK($id);

View file

@ -6,8 +6,6 @@ class Application_Model_Preference
public static function setValue($key, $value, $isUserValue = false) public static function setValue($key, $value, $isUserValue = false)
{ {
try { try {
$con = Propel::getConnection();
//called from a daemon process //called from a daemon process
if (!class_exists("Zend_Auth", false) || !Zend_Auth::getInstance()->hasIdentity()) { if (!class_exists("Zend_Auth", false) || !Zend_Auth::getInstance()->hasIdentity()) {
$id = NULL; $id = NULL;
@ -425,7 +423,6 @@ class Application_Model_Preference
{ {
self::setValue("timezone", $timezone); self::setValue("timezone", $timezone);
date_default_timezone_set($timezone); date_default_timezone_set($timezone);
$md = array("timezone" => $timezone);
} }
public static function GetTimezone() public static function GetTimezone()

View file

@ -75,7 +75,6 @@ SQL;
return; return;
} }
$con = Propel::getConnection();
$sql = "SELECT %%columns%% st.starts as starts, st.ends as ends, $sql = "SELECT %%columns%% st.starts as starts, st.ends as ends,
st.media_item_played as media_item_played, si.ends as show_ends st.media_item_played as media_item_played, si.ends as show_ends
%%tables%% WHERE "; %%tables%% WHERE ";

View file

@ -613,7 +613,6 @@ class Application_Model_Scheduler
Logging::debug("inserting after removing gaps."); Logging::debug("inserting after removing gaps.");
Logging::debug(floatval($endProfile) - floatval($startProfile)); Logging::debug(floatval($endProfile) - floatval($startProfile));
$afterInstanceId = $afterInstance->getDbId();
$modified = array_keys($modifiedMap); $modified = array_keys($modifiedMap);
//need to adjust shows we have moved items from. //need to adjust shows we have moved items from.
foreach ($modified as $instanceId) { foreach ($modified as $instanceId) {

View file

@ -127,8 +127,6 @@ class Application_Model_Show
public function getHosts() public function getHosts()
{ {
$con = Propel::getConnection();
$sql = <<<SQL $sql = <<<SQL
SELECT first_name, SELECT first_name,
last_name last_name
@ -149,8 +147,6 @@ SQL;
public function getHostsIds() public function getHostsIds()
{ {
$con = Propel::getConnection();
$sql = <<<SQL $sql = <<<SQL
SELECT subjs_id SELECT subjs_id
FROM cc_show_hosts FROM cc_show_hosts
@ -331,8 +327,6 @@ SQL;
*/ */
public function removeUncheckedDaysInstances($p_uncheckedDays) public function removeUncheckedDaysInstances($p_uncheckedDays)
{ {
$con = Propel::getConnection();
//need to convert local doftw to UTC doftw (change made for 2.0 since shows are stored in UTC) //need to convert local doftw to UTC doftw (change made for 2.0 since shows are stored in UTC)
$daysRemovedUTC = array(); $daysRemovedUTC = array();
@ -1348,13 +1342,10 @@ SQL;
*/ */
private static function populateNonRepeatingShow($p_showRow, $p_populateUntilDateTime) private static function populateNonRepeatingShow($p_showRow, $p_populateUntilDateTime)
{ {
$con = Propel::getConnection();
$show_id = $p_showRow["show_id"]; $show_id = $p_showRow["show_id"];
$first_show = $p_showRow["first_show"]; //non-UTC $first_show = $p_showRow["first_show"]; //non-UTC
$start_time = $p_showRow["start_time"]; //non-UTC $start_time = $p_showRow["start_time"]; //non-UTC
$duration = $p_showRow["duration"]; $duration = $p_showRow["duration"];
$day = $p_showRow["day"];
$record = $p_showRow["record"]; $record = $p_showRow["record"];
$timezone = $p_showRow["timezone"]; $timezone = $p_showRow["timezone"];
$start = $first_show." ".$start_time; $start = $first_show." ".$start_time;
@ -1413,8 +1404,6 @@ SQL;
*/ */
private static function populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, $p_interval) private static function populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, $p_interval)
{ {
$con = Propel::getConnection();
$show_id = $p_showDaysRow["show_id"]; $show_id = $p_showDaysRow["show_id"];
$next_pop_date = $p_showDaysRow["next_pop_date"]; $next_pop_date = $p_showDaysRow["next_pop_date"];
$first_show = $p_showDaysRow["first_show"]; //non-UTC $first_show = $p_showDaysRow["first_show"]; //non-UTC