Compare commits
2 Commits
c9f6b01fdc
...
ae477ab888
Author | SHA1 | Date | |
---|---|---|---|
ae477ab888 | |||
aa9bb4ad1a |
|
@ -54,7 +54,9 @@ function makeThumb($item = "") {
|
|||
$imgdata = null;
|
||||
for ( $i=0; $i<$zip->numFiles; $i++ ) {
|
||||
$imgname = basename($zip->getNameIndex($i));
|
||||
$imgext = strtolower(pathinfo($imgname)['extension']);
|
||||
$parts = pathinfo($imgname);
|
||||
if ( isset($parts['extension']) ) {
|
||||
$imgext = strtolower($parts['extension']);
|
||||
if ( (strcmp($lowest, $imgname) > 0)
|
||||
&& ((strcasecmp($imgext, "jpg") == 0)
|
||||
|| (strcasecmp($imgext, "png") == 0)
|
||||
|
@ -63,6 +65,7 @@ function makeThumb($item = "") {
|
|||
$imgdata = $zip->getFromIndex($i);
|
||||
}
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
if ( is_null($imgdata) ) return false;
|
||||
$didwrite = file_put_contents($outfile, $imgdata);
|
||||
|
@ -74,7 +77,9 @@ function makeThumb($item = "") {
|
|||
$lowest = "~";
|
||||
foreach ( $entries as $entry ) {
|
||||
$imgname = $entry->getName();
|
||||
$imgext = strtolower(pathinfo($imgname)['extension']);
|
||||
$parts = pathinfo($imgname);
|
||||
if ( isset($parts['extension']) ) {
|
||||
$imgext = strtolower($parts['extension']);
|
||||
if ( (strcmp($lowest, $imgname) > 0)
|
||||
&& ((strcasecmp($imgext, "jpg") == 0)
|
||||
|| (strcasecmp($imgext, "png") == 0)
|
||||
|
@ -84,6 +89,7 @@ function makeThumb($item = "") {
|
|||
if ( !$didwrite ) { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
rar_close($rar_file);
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -12,6 +12,7 @@ var lightbox = null;
|
|||
|
||||
function getFolderContents() {
|
||||
$("#list").html("");
|
||||
toastr.info("Loading folder contents. Comics containing a large number of issues, or issues with a large number of pages, that have not been opened recently may take some time to load. Thank you for your patience!", "Loading Contents...", {timeOut: 15000});
|
||||
$.ajax({
|
||||
url : 'ajax/getfoldercontents.php',
|
||||
dataType : 'json',
|
||||
|
|
Loading…
Reference in New Issue
Block a user