From 239dae03bfe8d793176907f6324ebd7db98155d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 16:57:12 +0100 Subject: [PATCH] fix php8 warnings --- htdocs/core/ajax/ajaxdirtree.php | 7 +++++-- htdocs/core/tpl/filemanager.tpl.php | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 1977cfac6e4..9a0a11f04d4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -58,8 +58,8 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call if ($selecteddir != '/') { $selecteddir = preg_replace('/\/$/', '', $selecteddir); // We removed last '/' except if it is '/' } -} else // For no ajax call -{ +} else { + // For no ajax call //if (GETPOST('preopened')) { $_GET['dir'] = $_POST['dir'] = GETPOST('preopened'); } $openeddir = GETPOST('openeddir'); @@ -76,6 +76,9 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call } } +$websitekey = GETPOST('websitekey', 'alpha'); +$pageid = GETPOST('pageid', 'int'); + // Load translation files required by the page $langs->load("ecm"); diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index de165c8c752..6ff7bba2390 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -71,7 +71,8 @@ print '
'; // Toolbar if ($permtoadd) { - print ''; + $websitekeyandpageid = (!empty($websitekey) ? '&website='.$websitekey : '').(!empty($pageid) ? '&pageid='.$pageid : ''); + print ''; print ''; print ''; } else {