fix php8 warnings

This commit is contained in:
Frédéric FRANCE 2021-03-19 16:57:12 +01:00
parent 3414511d7f
commit 239dae03bf
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 7 additions and 3 deletions

View File

@ -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");

View File

@ -71,7 +71,8 @@ print '<div class="inline-block toolbarbutton centpercent">';
// Toolbar
if ($permtoadd) {
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($websitekey ? '&website='.$websitekey : '').($pageid ? '&pageid='.$pageid : '').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid).'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">';
$websitekeyandpageid = (!empty($websitekey) ? '&website='.$websitekey : '').(!empty($pageid) ? '&pageid='.$pageid : '');
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).$websitekeyandpageid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1'.$websitekeyandpageid).'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">';
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
print '</a>';
} else {