From 87d1df5d034495bef6b4212c8bf49deca6ffa8b4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 26 Nov 2019 11:20:46 +0100 Subject: [PATCH] propperly check for passed parameter 'node', pass orderby to view --- out/out.FolderChooser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/out/out.FolderChooser.php b/out/out.FolderChooser.php index 8e764e5a9..ffea48194 100644 --- a/out/out.FolderChooser.php +++ b/out/out.FolderChooser.php @@ -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);