A few small efficiency cleanups and removal of dead references
This commit is contained in:
parent
8d30dd172e
commit
9fd372c6d0
|
|
@ -20,15 +20,14 @@ if ( !$validated ) {
|
|||
# usort function for sorting by array's "mtime"
|
||||
# Return 1 or -1 in reverse order so newest is first
|
||||
function compareDates($a, $b) {
|
||||
if ( $a["mtime"] == $b["mtime"] ) return 0;
|
||||
return ($a["mtime"] < $b["mtime"]) ? 1 : -1;
|
||||
return $b["mtime"] <=> $a["mtime"];
|
||||
}
|
||||
|
||||
# usort function for sorting by array's "name"
|
||||
# Does "natural" sorting so "28 Days Later" comes before "2099 Hulk"
|
||||
function compareNames($a, $b) {
|
||||
if ( $a["name"] == $b["name"] ) return 0;
|
||||
return strnatcmp($a["name"], $b["name"]);
|
||||
return strnatcasecmp($a["name"], $b["name"]);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -79,7 +78,7 @@ foreach ( $entries as $entry ) {
|
|||
$info["read"] = false;
|
||||
$readclass = "";
|
||||
}
|
||||
$info["div"] = "<div class='item folder{$readclass}' data-path=\"{$info["newpath"]}\" data-name=\"{$info["comname"]}\">";
|
||||
$info["div"] = "<div class='item folder{$readclass}' data-path=\"{$info["newpath"]}\" >";
|
||||
$info["div"] .= "<img class='thumbnail' src=\"{$info["thumburl"]}\"><br clear=all />{$info["comname"]}</div>";
|
||||
$folders[] = $info;
|
||||
} else {
|
||||
|
|
@ -109,7 +108,7 @@ foreach ( $entries as $entry ) {
|
|||
$info["div"] .= "<img class='issue thumbnail' data-relcomic=\"{$info["relcomic"]}\" data-comname=\"{$info["comname"]}\" border=0 src=\"{$info["thumburl"]}\">";
|
||||
$info["div"] .= "<br clear=all /><a href=\"downloadcomic.php?comic={$info["relcomic"]}\">{$info["comname"]}</a></div>";
|
||||
$issues[] = $info;
|
||||
$thumbfile = "../" . THUMBSDIR . $data['compath'] . "/" . $info['comname'] . ".jpg";
|
||||
//$thumbfile = "../" . THUMBSDIR . $data['compath'] . "/" . $info['comname'] . ".jpg";
|
||||
}
|
||||
}
|
||||
if ( isset($info["thumburl"]) && !file_exists("../" . $info["thumburl"]) ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user