cleanup of function names
This commit is contained in:
parent
923f4ee180
commit
fd78ad29bf
8 changed files with 23 additions and 31 deletions
|
@ -860,7 +860,7 @@ SQL;
|
|||
if (!is_null($item['file_id'])) {
|
||||
//row is from "file"
|
||||
$media_id = $item['file_id'];
|
||||
$storedFile = Application_Model_StoredFile::Recall($media_id);
|
||||
$storedFile = Application_Model_StoredFile::RecallById($media_id);
|
||||
$uri = $storedFile->getFilePath();
|
||||
self::createFileScheduleEvent($data, $item, $media_id, $uri);
|
||||
} elseif (!is_null($item['stream_id'])) {
|
||||
|
|
|
@ -202,8 +202,7 @@ class Application_Model_ShowBuilder
|
|||
// at the time of creating on show, the recorded file is not in the DB yet.
|
||||
// therefore, 'si_file_id' is null. So we need to check it.
|
||||
if (Application_Model_Preference::GetUploadToSoundcloudOption() && isset($p_item['si_file_id'])) {
|
||||
$file = Application_Model_StoredFile::Recall(
|
||||
$p_item['si_file_id']);
|
||||
$file = Application_Model_StoredFile::RecallById($p_item['si_file_id']);
|
||||
if (isset($file)) {
|
||||
$sid = $file->getSoundCloudId();
|
||||
$row['soundcloud_id'] = $sid;
|
||||
|
|
|
@ -113,13 +113,13 @@ SQL;
|
|||
|
||||
public function setSoundCloudFileId($p_soundcloud_id)
|
||||
{
|
||||
$file = Application_Model_StoredFile::Recall($this->_showInstance->getDbRecordedFile());
|
||||
$file = Application_Model_StoredFile::RecallById($this->_showInstance->getDbRecordedFile());
|
||||
$file->setSoundCloudFileId($p_soundcloud_id);
|
||||
}
|
||||
|
||||
public function getSoundCloudFileId()
|
||||
{
|
||||
$file = Application_Model_StoredFile::Recall($this->_showInstance->getDbRecordedFile());
|
||||
$file = Application_Model_StoredFile::RecallById($this->_showInstance->getDbRecordedFile());
|
||||
|
||||
return $file->getSoundCloudId();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ SQL;
|
|||
$file_id = $this->_showInstance->getDbRecordedFile();
|
||||
|
||||
if (isset($file_id)) {
|
||||
$file = Application_Model_StoredFile::Recall($file_id);
|
||||
$file = Application_Model_StoredFile::RecallById($file_id);
|
||||
|
||||
if (isset($file) && file_exists($file->getFilePath())) {
|
||||
return $file;
|
||||
|
|
|
@ -343,7 +343,7 @@ SQL;
|
|||
|
||||
if (is_array($ids) && count($ids) > 0) {
|
||||
return array_map( function ($id) {
|
||||
return Application_Model_Playlist::Recall($id);
|
||||
return Application_Model_Playlist::RecallById($id);
|
||||
}, $ids);
|
||||
} else {
|
||||
return array();
|
||||
|
@ -582,8 +582,7 @@ SQL;
|
|||
return $storedFile;
|
||||
}
|
||||
|
||||
public static function Recall($p_id=null, $p_gunid=null, $p_md5sum=null,
|
||||
$p_filepath=null, $con=null) {
|
||||
public static function RecallById($p_id=null, $con=null) {
|
||||
|
||||
//TODO
|
||||
if (is_null($con)) {
|
||||
|
@ -593,14 +592,8 @@ SQL;
|
|||
if (isset($p_id)) {
|
||||
$f = CcFilesQuery::create()->findPK(intval($p_id), $con);
|
||||
return is_null($f) ? null : self::createWithFile($f, $con);
|
||||
} elseif ( isset($p_gunid) ) {
|
||||
throw new Exception("You should never use gunid ($gunid) anymore");
|
||||
} elseif ( isset($p_md5sum) ) {
|
||||
throw new Exception("Searching by md5($p_md5sum) is disabled");
|
||||
} elseif ( isset($p_filepath) ) {
|
||||
return is_null($f) ? null : Application_Model_StoredFile::RecallByFilepath($p_filepath, $con);
|
||||
} else {
|
||||
throw new Exception("No arguments passed to Recall");
|
||||
throw new Exception("No arguments passed to RecallById");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -823,7 +816,7 @@ SQL;
|
|||
$row['bit_rate'] = $formatter->format();
|
||||
|
||||
//soundcloud status
|
||||
$file = Application_Model_StoredFile::Recall($row['id']);
|
||||
$file = Application_Model_StoredFile::RecallById($row['id']);
|
||||
$row['soundcloud_status'] = $file->getSoundCloudId();
|
||||
|
||||
// for audio preview
|
||||
|
@ -1317,7 +1310,7 @@ SQL;
|
|||
|
||||
public static function setIsPlaylist($p_playlistItems, $p_type, $p_status) {
|
||||
foreach ($p_playlistItems as $item) {
|
||||
$file = self::Recall($item->getDbFileId());
|
||||
$file = self::RecallById($item->getDbFileId());
|
||||
$fileId = $file->_file->getDbId();
|
||||
if ($p_type == 'playlist') {
|
||||
// we have to check if the file is in another playlist before
|
||||
|
@ -1339,7 +1332,7 @@ SQL;
|
|||
} else {
|
||||
$fileId = $p_fileId;
|
||||
}
|
||||
$file = self::Recall($fileId);
|
||||
$file = self::RecallById($fileId);
|
||||
$updateIsScheduled = false;
|
||||
|
||||
if (!is_null($fileId) && !in_array($fileId, Application_Model_Schedule::getAllFutureScheduledFiles())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue