true, ) ); $class = ' class="list_container'; if ($GLOBALS['cfg']['NavigationLinkWithMainPanel']) { $class .= ' synced'; } if ($GLOBALS['cfg']['NavigationTreePointerEnable']) { $class .= ' highlight'; } $class .= '"'; $buffer = '
';
} elseif (@file_exists($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
$logo = '
';
}
if (!$GLOBALS['cfg']['NavigationLogoLink']) {
return Template::get('navigation/logo')
->render(
array(
'displayLogo' => true,
'useLogoLink' => false,
'logo' => $logo,
)
);
}
$useLogoLink = true;
$linkAttriks = null;
$logoLink = trim(
htmlspecialchars($GLOBALS['cfg']['NavigationLogoLink'])
);
// prevent XSS, see PMASA-2013-9
// if link has protocol, allow only http and https
if (! PMA_checkLink($logoLink, true)) {
$logoLink = 'index.php';
}
switch ($GLOBALS['cfg']['NavigationLogoLinkWindow']) {
case 'new':
$linkAttriks = 'target="_blank" rel="noopener noreferrer"';
break;
case 'main':
// do not add our parameters for an external link
$host = parse_url(
$GLOBALS['cfg']['NavigationLogoLink'],
PHP_URL_HOST
);
if (empty($host)) {
$logoLink .= PMA_URL_getCommon();
} else {
$linkAttriks = 'target="_blank" rel="noopener noreferrer"';
}
}
return Template::get('navigation/logo')
->render(
array(
'displayLogo' => true,
'useLogoLink' => $useLogoLink,
'logoLink' => $logoLink,
'linkAttribs' => $linkAttriks,
'logo' => $logo,
)
);
}
/**
* Creates the code for displaying the links
* at the top of the navigation panel
*
* @return string HTML code for the links
*/
private function _links()
{
// always iconic
$showIcon = true;
$showText = false;
$retval = '';
$retval .= '