|
|
@@ -194,17 +194,12 @@ include '../auth.php';
|
|
|
$files = scandir($path);
|
|
|
$files = array_diff(scandir($path), array('.', '..','Thumbs.db'));//If you are on windows,then ignore the Thumbs.db
|
|
|
foreach ($files as $file){
|
|
|
- //Decode File Name
|
|
|
- if (!defined('PHP_VERSION_ID')) {
|
|
|
- $version = explode('.', PHP_VERSION);
|
|
|
- define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
//check if PHP was higher than 7.4, if true then not using inith filename
|
|
|
- if(PHP_VERSION_ID >= 70404){
|
|
|
- $filename = $file;
|
|
|
- }else{
|
|
|
+ if(substr(basename($file),0,5) === "inith"){
|
|
|
$filename = hex2bin(str_replace("." . pathinfo($file, PATHINFO_EXTENSION),"",str_replace("inith","",$file))) . "." . pathinfo($file, PATHINFO_EXTENSION);
|
|
|
+ }else{
|
|
|
+ $filename = $file;
|
|
|
}
|
|
|
|
|
|
|