FIX php8 compatibility

This commit is contained in:
Philippe GRAND 2022-08-24 09:59:08 +02:00
parent 2e49ae143f
commit 422fd2871e

View File

@ -185,7 +185,7 @@ $message .= ajax_autoselect('webdavpublicurl');
$message .= '<br>'; $message .= '<br>';
if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) {
$urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : ''); $urlEntity = (isModEnabled('multicompany') ? '?entity=' . $conf->entity : '');
$url = '<a href="' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '" target="_blank" rel="noopener noreferrer">' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '</a>'; $url = '<a href="' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '" target="_blank" rel="noopener noreferrer">' . $urlwithroot . '/dav/fileserver.php/public/' . $urlEntity . '</a>';
$message .= img_picto('', 'globe') . ' ' . str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '')); $message .= img_picto('', 'globe') . ' ' . str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', ''));