May I suggest perhaps changing line 3846 as below:
Code:
function zen_get_uploaded_file($filename) {3842
global $db;
$parts = explode(". ", $filename, 2);
$filenum = $parts[0];
$filename = $parts[1];
$file_parts = explode(".", $filename, 2);
$filetype = $file_parts[sizeof($file_parts) - 1];
return $filenum . "." . $filetype;
}
Code:
function zen_get_uploaded_file($filename) {3842
global $db;
$parts = explode(". ", $filename, 2);
$filenum = $parts[0];
$filename = $parts[1];
$file_parts = explode(".", $filename);
$filetype = $file_parts[sizeof($file_parts) - 1];
return $filenum . "." . $filetype;
}
from
Code:
$file_parts = explode(".", $filename, 2);
to
Code:
$file_parts = explode(".", $filename);
Or if necessary just change the assignment of $filetype using the above suggested code. This would then look like:
Code:
function zen_get_uploaded_file($filename) {3842
global $db;
$parts = explode(". ", $filename, 2);
$filenum = $parts[0];
$filename = $parts[1];
//$file_parts = explode(".", $filename);
$filetype = pathinfo($filename, PATHINFO_EXTENSION);
return $filenum . "." . $filetype;
}
$fileparts becomes unnecessary when pathinfo is used, though one interesting thing about attempting to use that function is that it seems that the filesystem in some way is accessed because when I try to use that function on a publicly available php site, they say they have disabled the function for security purposes...
Bookmarks