Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shirosaidev committed Oct 21, 2022
1 parent 0af4ac7 commit 9e99d3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions diskover-web/public/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@
$pp = ltrim($pp, '(');
$path = rtrim($pp, '*)');
$rootpath = getRootpath($path);
$_SESSION['rootpath'] = $rootpath;
createCookie('rootpath', $rootpath);
// set path cookie to update tree
createCookie('path', $path);
createCookie('parentpath', getParentDir($path));
if (!is_null($rootpath)) {
$_SESSION['rootpath'] = $rootpath;
createCookie('rootpath', $rootpath);
// set path cookie to update tree
createCookie('path', $path);
createCookie('parentpath', getParentDir($path));
}
}

// curent page
Expand Down
1 change: 1 addition & 0 deletions diskover-web/src/diskover/Diskover.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ function getRootPath($p)
} elseif ($p != '/') {
return getRootPath(dirname($p));
}
return null;
}


Expand Down

0 comments on commit 9e99d3e

Please sign in to comment.