Merge branch 'cc-4585' of https://github.com/rgrinberg/Airtime into devel
This commit is contained in:
commit
d467abe509
20 changed files with 215 additions and 110 deletions
|
@ -335,7 +335,7 @@ SQL;
|
|||
* @param boolean $p_deleteFile
|
||||
*
|
||||
*/
|
||||
public function delete($deleteFromPlaylist=false)
|
||||
public function delete()
|
||||
{
|
||||
|
||||
$filepath = $this->getFilePath();
|
||||
|
@ -359,11 +359,8 @@ SQL;
|
|||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
|
||||
if ($deleteFromPlaylist) {
|
||||
Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
||||
}
|
||||
// set file_exists falg to false
|
||||
$this->_file->setDbFileExists(false);
|
||||
$this->_file->setDbHidden(true);
|
||||
$this->_file->save();
|
||||
}
|
||||
|
||||
|
@ -1026,6 +1023,10 @@ SELECT filepath AS fp
|
|||
FROM CC_FILES AS f
|
||||
WHERE f.directory = :dir_id
|
||||
SQL;
|
||||
|
||||
# TODO : the option $all is deprecated now and is always true.
|
||||
# refactor code where it's still being passed
|
||||
$all = true;
|
||||
|
||||
if (!$all) {
|
||||
$sql .= " AND f.file_exists = 'TRUE'";
|
||||
|
@ -1165,10 +1166,14 @@ SQL;
|
|||
->save();
|
||||
}
|
||||
|
||||
public function getFileExistsFlag()
|
||||
{
|
||||
return $this->_file->getDbFileExists();
|
||||
}
|
||||
|
||||
// This method seems to be unsued everywhere so I've commented it out
|
||||
// If it's absence does not have any effect then it will be completely
|
||||
// removed soon
|
||||
//public function getFileExistsFlag()
|
||||
//{
|
||||
//return $this->_file->getDbFileExists();
|
||||
//}
|
||||
|
||||
public function getFileOwnerId()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue