mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-08-06 16:57:11 +02:00
Removed unused function (#806)
To fix: Undefined constant 'FM_EXTENSION'
This commit is contained in:
committed by
GitHub
parent
17de8af81b
commit
b24887d4fd
@@ -2185,27 +2185,6 @@ fm_show_footer();
|
|||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the filename is allowed.
|
|
||||||
* @param string $filename
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
function fm_is_file_allowed($filename)
|
|
||||||
{
|
|
||||||
// By default, no file is allowed
|
|
||||||
$allowed = false;
|
|
||||||
|
|
||||||
if (FM_EXTENSION) {
|
|
||||||
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
|
||||||
|
|
||||||
if (in_array($ext, explode(',', strtolower(FM_EXTENSION)))) {
|
|
||||||
$allowed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete file or folder (recursively)
|
* Delete file or folder (recursively)
|
||||||
* @param string $path
|
* @param string $path
|
||||||
|
Reference in New Issue
Block a user