1
0
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:
Cameron
2017-12-09 15:06:10 -08:00
parent c31dbad0dd
commit f9ce811c49
2 changed files with 40 additions and 1 deletions

View File

@@ -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;
}
/**