mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
Fixes #802 - Deleting physical files from media-manager.
This commit is contained in:
@@ -1152,7 +1152,32 @@ class e_file
|
||||
{
|
||||
return $newFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete a file.
|
||||
* @param $file
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($file)
|
||||
{
|
||||
if(empty($file))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$file = e107::getParser()->replaceConstants($file);
|
||||
|
||||
if(file_exists($file))
|
||||
{
|
||||
return unlink($file);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user