mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 22:47:19 +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");
|
require_once("inc/inc.Authentication.php");
|
||||||
|
|
||||||
if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
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;
|
$nodeid = $settings->_rootFolderID;
|
||||||
} else {
|
} else {
|
||||||
$nodeid = intval($_GET["node"]);
|
$nodeid = intval($_GET["node"]);
|
||||||
|
@ -48,9 +48,9 @@ if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolderid'=>$settings->_rootFolderID));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolderid'=>$settings->_rootFolderID));
|
||||||
if($view) {
|
if($view) {
|
||||||
|
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
||||||
if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
if(isset($_GET['action']) && $_GET['action'] == 'subtree') {
|
||||||
$view->setParam('node', $node);
|
$view->setParam('node', $node);
|
||||||
$view->setParam('orderby', $settings->_sortFoldersDefault);
|
|
||||||
} else {
|
} else {
|
||||||
$view->setParam('form', $form);
|
$view->setParam('form', $form);
|
||||||
$view->setParam('mode', $mode);
|
$view->setParam('mode', $mode);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user