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"
|
# usort function for sorting by array's "mtime"
|
||||||
# Return 1 or -1 in reverse order so newest is first
|
# Return 1 or -1 in reverse order so newest is first
|
||||||
function compareDates($a, $b) {
|
function compareDates($a, $b) {
|
||||||
if ( $a["mtime"] == $b["mtime"] ) return 0;
|
return $b["mtime"] <=> $a["mtime"];
|
||||||
return ($a["mtime"] < $b["mtime"]) ? 1 : -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# usort function for sorting by array's "name"
|
# usort function for sorting by array's "name"
|
||||||
# Does "natural" sorting so "28 Days Later" comes before "2099 Hulk"
|
# Does "natural" sorting so "28 Days Later" comes before "2099 Hulk"
|
||||||
function compareNames($a, $b) {
|
function compareNames($a, $b) {
|
||||||
if ( $a["name"] == $b["name"] ) return 0;
|
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;
|
$info["read"] = false;
|
||||||
$readclass = "";
|
$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>";
|
$info["div"] .= "<img class='thumbnail' src=\"{$info["thumburl"]}\"><br clear=all />{$info["comname"]}</div>";
|
||||||
$folders[] = $info;
|
$folders[] = $info;
|
||||||
} else {
|
} 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"] .= "<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>";
|
$info["div"] .= "<br clear=all /><a href=\"downloadcomic.php?comic={$info["relcomic"]}\">{$info["comname"]}</a></div>";
|
||||||
$issues[] = $info;
|
$issues[] = $info;
|
||||||
$thumbfile = "../" . THUMBSDIR . $data['compath'] . "/" . $info['comname'] . ".jpg";
|
//$thumbfile = "../" . THUMBSDIR . $data['compath'] . "/" . $info['comname'] . ".jpg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( isset($info["thumburl"]) && !file_exists("../" . $info["thumburl"]) ) {
|
if ( isset($info["thumburl"]) && !file_exists("../" . $info["thumburl"]) ) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user