Compare commits
No commits in common. "1d10e377473cfb7eda2ecdaa4a8f0468e17f0719" and "3ea9a2a5dd544c5ff26e74df644abe0aa6a10096" have entirely different histories.
1d10e37747
...
3ea9a2a5dd
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -26,7 +26,3 @@ compressed
|
|||
|
||||
comics/
|
||||
thumbs/
|
||||
|
||||
# Temporary PHP files
|
||||
|
||||
?.php
|
||||
|
|
|
@ -96,9 +96,6 @@ if ( $_SESSION["sortorder"] == SORTBYNAME ) {
|
|||
usort($issues, "compareNames");
|
||||
|
||||
$data["compath"] = $compath;
|
||||
$pathparts = pathinfo($compath);
|
||||
$data["parentpath"] = $pathparts['dirname'];
|
||||
$data["foldername"] = $pathparts['basename'];
|
||||
$data["contents"] = array_merge($folders, $issues);
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
@ -10,18 +10,13 @@ $data = array();
|
|||
$data["error"] = false;
|
||||
$data["message"] = "";
|
||||
|
||||
$newpath = urldecode($_REQUEST['path']);
|
||||
|
||||
$comicfull = realpath(COMICSDIR . $newpath);
|
||||
if ( ($newpath == "/") || ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) {
|
||||
$comicfull = realpath(COMICSDIR . urldecode($_REQUEST['path']));
|
||||
if ( ($comicfull === false) || (substr($comicfull, 0, strlen(COMICSDIR)) != COMICSDIR) ) {
|
||||
$_SESSION['compath'] = "/";
|
||||
} else {
|
||||
$_SESSION['compath'] = substr($comicfull, strlen(COMICSDIR));
|
||||
}
|
||||
$data["message"] = "New comic path: {$_SESSION["compath"]}";
|
||||
$pathparts = pathinfo($_SESSION['compath']);
|
||||
$data["parentpath"] = $pathparts["dirname"];
|
||||
$data["foldername"] = $pathparts["basename"];
|
||||
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($data);
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
var curpath = "/";
|
||||
var parentpath = "/";
|
||||
var foldername = "";
|
||||
|
||||
// This function is executed after the page load completes on the client
|
||||
$(document).ready(function() {
|
||||
$("#path").click(function() { changeFolder(parentpath, parentpath); });
|
||||
$("#path").click(function() { changeFolder("/", "/"); });
|
||||
getFolderContents();
|
||||
});
|
||||
|
||||
|
@ -33,7 +31,7 @@ function updatePathNavigator() {
|
|||
if ( curpath == "/" ) {
|
||||
navpath = "/";
|
||||
} else {
|
||||
navpath = "/Comics" + parentpath;
|
||||
navpath = "/Comics";
|
||||
}
|
||||
$("#path").html(navpath);
|
||||
}
|
||||
|
@ -48,8 +46,6 @@ function changeFolder(name, path) {
|
|||
success : function(data, stat, jqo) {
|
||||
console.log(data.message);
|
||||
curpath = path;
|
||||
parentpath = data.parentpath;
|
||||
foldername = data.foldername;
|
||||
getFolderContents();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user