Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1979,21 +1979,8 @@ public static function init()
$_SESSION['ee_user_name'] = isset($_POST['user_name'])?$_POST['user_name']:"";
$_SESSION['ee_user_pass'] = $_POST['user_pass'];

$addr = $_SERVER['PHP_SELF'];
$param = '';

if(isset($_GET['m']))
$param .= (strlen($param) == 0 ? '?m' : '&m');

if(isset($_GET['s']))
$param .= (strlen($param) == 0 ? '?s' : '&s');

if(isset($_GET['dir']) && strlen($_GET['dir']) > 0)
{
$param .= (strlen($param) == 0 ? '?dir=' : '&dir=');
$param .= urlencode($_GET['dir']);
}
header( "Location: ".$addr.$param);
// Refresh page
EncodeExplorer::refresh();
}
else
$encodeExplorer->setErrorString("wrong_pass");
Expand Down Expand Up @@ -2250,6 +2237,9 @@ function run($location)
FileManager::delete_dir($path);
else if(is_file($path))
FileManager::delete_file($path);

// Refresh so 'del' param is not in address anymore
EncodeExplorer::refresh();
}
}
}
Expand Down Expand Up @@ -2900,6 +2890,28 @@ function run($location)
$this->outputHtml();
}

//
// Refresh current page
//
public static function refresh()
{
$addr = $_SERVER['PHP_SELF'];
$param = '';

if(isset($_GET['m']))
$param .= (strlen($param) == 0 ? '?m' : '&m');

if(isset($_GET['s']))
$param .= (strlen($param) == 0 ? '?s' : '&s');

if(isset($_GET['dir']) && strlen($_GET['dir']) > 0)
{
$param .= (strlen($param) == 0 ? '?dir=' : '&dir=');
$param .= urlencode($_GET['dir']);
}
header( "Location: ".$addr.$param);
}

public function printLoginBox()
{
?>
Expand Down