Skip to content

Commit

Permalink
5636 added SESSION variable to contain pathext while in subfolder in …
Browse files Browse the repository at this point in the history
…the file manager
  • Loading branch information
gregrgay committed Mar 27, 2016
1 parent aa98fbe commit 537885d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mods/_core/file_manager/index.php
Expand Up @@ -43,8 +43,12 @@

if ($_GET['pathext'] != '') {
$pathext = urldecode($_GET['pathext']);
$_SESSION['pathext'] = urldecode($_GET['pathext']);
} else if ($_POST['pathext'] != '') {
$pathext = $_POST['pathext'];
$_SESSION['pathext'] = urldecode($_POST['pathext']);
} else {
unset($_SESSION['pathext']);
}

if($_GET['back'] == 1) {
Expand Down
10 changes: 8 additions & 2 deletions mods/_core/file_manager/new.php
Expand Up @@ -25,8 +25,14 @@

$popup = $_REQUEST['popup'];
$framed = $_REQUEST['framed'];
$_POST['pathext'] = htmlspecialchars($_POST['pathext'], ENT_QUOTES);
$_REQUEST['pathext'] = htmlspecialchars($_REQUEST['pathext'], ENT_QUOTES);
if($_POST['pathext'] == ''){
$_POST['pathext'] = htmlspecialchars($_SESSION['pathext'], ENT_QUOTES);
$_REQUEST['pathext'] = htmlspecialchars($_SESSION['pathext'], ENT_QUOTES);
} else {
$_POST['pathext'] = htmlspecialchars($_POST['pathext'], ENT_QUOTES);
$_REQUEST['pathext'] = htmlspecialchars($_REQUEST['pathext'], ENT_QUOTES);
}

$_POST['framed'] = intval($_POST['framed']);
$_POST['popup'] = intval($_POST['popup']);

Expand Down

0 comments on commit 537885d

Please sign in to comment.