Switch to PHP API calls instead of substr() to get extension

This commit is contained in:
Junior 2023-09-04 14:25:48 -04:00
parent 0e64245e90
commit 65ce549848

View File

@ -60,7 +60,7 @@ if ( $ext == "cbz" ) {
$myfile = $comicoutputfull . $file; $myfile = $comicoutputfull . $file;
$mynewfile = $comicoutputfull . str_replace("#", "", $file); $mynewfile = $comicoutputfull . str_replace("#", "", $file);
//$myext = strtolower(substr($file, -3)); //$myext = strtolower(substr($file, -3));
$myext = strtolower(pathinfo($imgname)['extension']); $myext = strtolower(pathinfo($myfile)['extension']);
if ( ($myext == "jpg") || ($myext == "png") || ($myext == "webp") ) { if ( ($myext == "jpg") || ($myext == "png") || ($myext == "webp") ) {
rename($myfile, $mynewfile); rename($myfile, $mynewfile);
$files[] = basename($mynewfile); $files[] = basename($mynewfile);