Compare commits
No commits in common. "0e64245e90e8f368010f726a4f3d20382ef82fd5" and "feb69966d616a20a79587542be9d649e39936d0e" have entirely different histories.
0e64245e90
...
feb69966d6
|
@ -83,14 +83,13 @@ foreach ( $entries as $entry ) {
|
|||
}
|
||||
}
|
||||
|
||||
// Sort folders based on current sort order
|
||||
if ( $_SESSION["sortorder"] == SORTBYNAME ) {
|
||||
usort($folders, "compareNames");
|
||||
usort($issues, "compareNames");
|
||||
} else {
|
||||
usort($folders, "compareDates");
|
||||
usort($issues, "compareDates");
|
||||
}
|
||||
// Always sort issues by name
|
||||
usort($issues, "compareNames");
|
||||
|
||||
$data["compath"] = $compath;
|
||||
$data["contents"] = array_merge($folders, $issues);
|
||||
|
|
|
@ -44,9 +44,8 @@ if ( $ext == "cbz" ) {
|
|||
$opened = $zip->open($comicfull);
|
||||
for ( $i=0; $i<$zip->numFiles; $i++ ) {
|
||||
$imgname = basename($zip->getNameIndex($i));
|
||||
//$myext = substr($imgname, -3);
|
||||
$myext = strtolower(pathinfo($imgname)['extension']);
|
||||
if ( ($myext == "jpg") || ($myext == "png") || ($myext == "webp") ) {
|
||||
$myext = substr($imgname, -3);
|
||||
if ( ($myext == "jpg") || ($myext == "png") ) {
|
||||
$imgname = str_replace("#", "", $imgname);
|
||||
$imgcontents = $zip->getFromIndex($i);
|
||||
$written = file_put_contents($comicoutputfull . $imgname, $imgcontents);
|
||||
|
@ -59,9 +58,8 @@ if ( $ext == "cbz" ) {
|
|||
while ( false !== ($file = readdir($fh)) ) {
|
||||
$myfile = $comicoutputfull . $file;
|
||||
$mynewfile = $comicoutputfull . str_replace("#", "", $file);
|
||||
//$myext = strtolower(substr($file, -3));
|
||||
$myext = strtolower(pathinfo($imgname)['extension']);
|
||||
if ( ($myext == "jpg") || ($myext == "png") || ($myext == "webp") ) {
|
||||
$myext = strtolower(substr($file, -3));
|
||||
if ( ($myext == "jpg") || ($myext == "png") ) {
|
||||
rename($myfile, $mynewfile);
|
||||
$files[] = basename($mynewfile);
|
||||
}
|
||||
|
|
|
@ -45,11 +45,9 @@ function makeThumb($item = "") {
|
|||
$imgdata = null;
|
||||
for ( $i=0; $i<$zip->numFiles; $i++ ) {
|
||||
$imgname = basename($zip->getNameIndex($i));
|
||||
$imgext = strtolower(pathinfo($imgname)['extension']);
|
||||
if ( (strcmp($lowest, $imgname) > 0)
|
||||
&& ((strcasecmp($imgext, "jpg") == 0)
|
||||
|| (strcasecmp($imgext, "png") == 0)
|
||||
|| (strcasecmp($imgext, "webp") == 0)) ) {
|
||||
&& ((strcasecmp(substr($imgname, -3), "jpg") == 0)
|
||||
|| (strcasecmp(substr($imgname, -3), "png") == 0)) ) {
|
||||
$lowest = $imgname;
|
||||
$imgdata = $zip->getFromIndex($i);
|
||||
}
|
||||
|
@ -65,12 +63,11 @@ function makeThumb($item = "") {
|
|||
$lowest = "~";
|
||||
foreach ( $entries as $entry ) {
|
||||
$imgname = $entry->getName();
|
||||
$imgext = strtolower(pathinfo($imgname)['extension']);
|
||||
if ( (strcmp($lowest, $imgname) > 0)
|
||||
&& ((strcasecmp($imgext, "jpg") == 0)
|
||||
|| (strcasecmp($imgext, "png") == 0)
|
||||
|| (strcasecmp($imgext, "webp") == 0)) ) {
|
||||
&& ((strcasecmp(substr($imgname, -3), "jpg") == 0)
|
||||
|| (strcasecmp(substr($imgname, -3), "png") == 0)) ) {
|
||||
$lowest = $imgname;
|
||||
$ext = strtolower(substr($imgname, -3));
|
||||
$didwrite = $entry->extract(false, $outfile);
|
||||
if ( !$didwrite ) { return false; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user