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

This commit is contained in:
James 2012-09-17 14:58:45 -04:00
commit b6f447a827
5 changed files with 25 additions and 12 deletions

View File

@ -490,6 +490,8 @@ class LibraryController extends Zend_Controller_Action
$this->view->sc_id = $file->getSoundCloudId();
$this->view->error_code = $file->getSoundCloudErrorCode();
$this->view->error_msg = $file->getSoundCloudErrorMsg();
} else {
Logging::warn("Trying to upload unknown type: $type with id: $id");
}
}
}

View File

@ -1100,7 +1100,17 @@ class Application_Model_Preference
return function ($x) { return $x; };
} else {
$ds = unserialize($v);
return function ($x) use ($ds) { return $ds['ColReorder'][$x]; } ;
return function ($x) use ($ds) {
if ( in_array($x, $ds['ColReorder'] ) ) {
return $ds['ColReorder'][$x];
} else {
Logging::warn("Index $x does not exist preferences");
Logging::warn("Defaulting to identity and printing
preferences");
Logging::warn($ds);
return $x;
}
} ;
}
}

View File

@ -344,12 +344,12 @@ SELECT showt.name AS show_name,
JOIN cc_show AS showt ON (showt.id = si.show_id)
WHERE si.modified_instance = FALSE
$showPredicate
AND (si.starts >= '{$p_start}'
AND ((si.starts >= '{$p_start}'
AND si.starts < '{$p_end}')
OR (si.ends > '{$p_start}'
AND si.ends <= '{$p_end}')
OR (si.starts <= '{$p_start}'
AND si.ends >= '{$p_end}')
AND si.ends >= '{$p_end}'))
ORDER BY si_starts,
sched_starts;
SQL;

View File

@ -23,7 +23,8 @@ class Application_Model_Soundcloud
return $token;
}
public function uploadTrack($filepath, $filename, $description, $tags=array(), $release=null, $genre=null)
public function uploadTrack($filepath, $filename, $description,
$tags=array(), $release=null, $genre=null)
{
if ($this->getToken()) {
if (count($tags)) {