mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-31 05:57:34 +00:00
propperly check for passed parameter 'node', pass orderby to view
This commit is contained in:
parent
413bbad196
commit
87d1df5d03
|
@ -29,7 +29,7 @@ require_once("inc/inc.ClassUI.php");
|
|||
require_once("inc/inc.Authentication.php");
|
||||
|
||||
if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
||||
if (isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"])<1) {
|
||||
if (!isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"])<1) {
|
||||
$nodeid = $settings->_rootFolderID;
|
||||
} else {
|
||||
$nodeid = intval($_GET["node"]);
|
||||
|
@ -48,9 +48,9 @@ if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
|||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolderid'=>$settings->_rootFolderID));
|
||||
if($view) {
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
||||
$view->setParam('node', $node);
|
||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||
} else {
|
||||
$view->setParam('form', $form);
|
||||
$view->setParam('mode', $mode);
|
||||
|
|
Loading…
Reference in New Issue
Block a user