CC-2225 airtime-clean-storage doesnt work
Forced the user to run the script as superuser.
This commit is contained in:
parent
78ed3e2822
commit
219598ac06
2 changed files with 15 additions and 6 deletions
|
@ -1174,10 +1174,7 @@ class StoredFile {
|
|||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return PEAR::raiseError(
|
||||
"StoredFile::deleteFile: unlink failed ({$this->filepath})",
|
||||
GBERR_FILEIO
|
||||
);
|
||||
return PEAR::raiseError("StoredFile::deleteFile: unlink failed ({$this->filepath})");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1237,7 +1234,10 @@ class StoredFile {
|
|||
$files = StoredFile::getAll();
|
||||
foreach ($files as $file) {
|
||||
$media = StoredFile::Recall($file["id"]);
|
||||
$media->delete();
|
||||
$result = $media->delete();
|
||||
if (PEAR::isError($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue