CC-3290: A file should be removed from playlists if it is removed
through the interface - fixed
This commit is contained in:
parent
5d02581d38
commit
4ffe79a286
|
@ -168,7 +168,7 @@ class LibraryController extends Zend_Controller_Action
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = $file->delete();
|
$res = $file->delete(true);
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
if (PEAR::isError($res)) {
|
||||||
$this->view->message = $res->getMessage();
|
$this->view->message = $res->getMessage();
|
||||||
|
|
|
@ -303,7 +303,7 @@ class Application_Model_StoredFile {
|
||||||
*
|
*
|
||||||
* @return void|PEAR_Error
|
* @return void|PEAR_Error
|
||||||
*/
|
*/
|
||||||
public function delete()
|
public function delete($deleteFromPlaylist=false)
|
||||||
{
|
{
|
||||||
if ($this->exists()) {
|
if ($this->exists()) {
|
||||||
if ($this->getFormat() == 'audioclip') {
|
if ($this->getFormat() == 'audioclip') {
|
||||||
|
@ -314,8 +314,9 @@ class Application_Model_StoredFile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't delete from the playslist. We might want to put a flag
|
if($deleteFromPlaylist){
|
||||||
//Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
||||||
|
}
|
||||||
|
|
||||||
// set file_exists falg to false
|
// set file_exists falg to false
|
||||||
$this->_file->setDbFileExists(false);
|
$this->_file->setDbFileExists(false);
|
||||||
|
|
Loading…
Reference in New Issue