Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Rudi Grinberg 2012-09-12 17:27:08 -04:00
commit 536fdabb77
10 changed files with 2710 additions and 29 deletions

View File

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

View File

@ -116,7 +116,6 @@ class Application_Model_Datatables
$simpleWhere = array();
foreach ($searchTerms as $term) {
$innerCond = array();
foreach ($searchCols as $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();
$mailServerPort = Application_Model_Preference::GetMailServerPort();
if (!empty($mailServerPort)) {
$port = Application_Model_Preference::GetMailServerPort();
$port = $mailServerPort;
}
if ($mailServerRequiresAuth) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -127,8 +127,6 @@ class Application_Model_Show
public function getHosts()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT first_name,
last_name
@ -149,8 +147,6 @@ SQL;
public function getHostsIds()
{
$con = Propel::getConnection();
$sql = <<<SQL
SELECT subjs_id
FROM cc_show_hosts
@ -331,8 +327,6 @@ SQL;
*/
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)
$daysRemovedUTC = array();
@ -1348,13 +1342,10 @@ SQL;
*/
private static function populateNonRepeatingShow($p_showRow, $p_populateUntilDateTime)
{
$con = Propel::getConnection();
$show_id = $p_showRow["show_id"];
$first_show = $p_showRow["first_show"]; //non-UTC
$start_time = $p_showRow["start_time"]; //non-UTC
$duration = $p_showRow["duration"];
$day = $p_showRow["day"];
$record = $p_showRow["record"];
$timezone = $p_showRow["timezone"];
$start = $first_show." ".$start_time;
@ -1413,8 +1404,6 @@ SQL;
*/
private static function populateRepeatingShow($p_showDaysRow, $p_populateUntilDateTime, $p_interval)
{
$con = Propel::getConnection();
$show_id = $p_showDaysRow["show_id"];
$next_pop_date = $p_showDaysRow["next_pop_date"];
$first_show = $p_showDaysRow["first_show"]; //non-UTC

File diff suppressed because it is too large Load Diff