CC-1799 Put Airtime Storage into a Human Readable File Naming Convention

delete is working, can upload from plupload.
This commit is contained in:
Naomi Aro 2011-06-13 16:41:57 +02:00
parent 8a15144dc8
commit 84dd5dac62
4 changed files with 73 additions and 80 deletions

View file

@ -259,19 +259,16 @@ class StoredFile {
*/
public function delete()
{
if (!$this->exists()) {
return PEAR::raiseError('File does not exist.');
}
if ($this->getFormat() == 'audioclip') {
$res = $this->deleteFile();
if (PEAR::isError($res)) {
return $res;
if ($this->exists()) {
if ($this->getFormat() == 'audioclip') {
$res = $this->deleteFile();
if (PEAR::isError($res)) {
return $res;
}
}
}
Playlist::DeleteFileFromAllPlaylists($this->getId());
$this->_file->delete();
}