Skip to content
Permalink
Browse files

Fix for Register and Login button

  • Loading branch information...
LotarProject committed Apr 8, 2019
1 parent abcd8c8 commit 4d8b02196a2d8e500fd1b39e76d2003c7ad904f0
Showing with 20 additions and 10 deletions.
  1. +8 −2 inc/Template.php
  2. +12 −8 tpl/navbar.php
@@ -2845,12 +2845,18 @@ public function getToolMenu($tool)
public function getToolMenuItem($tool, $item)
{
return $this->toolsMenu[$tool]['menu'][$item]['object'];
if (isset($this->toolsMenu[$tool]) && isset($this->toolsMenu[$tool]['menu'][$item])) {
return $this->toolsMenu[$tool]['menu'][$item]['object'];
}
return null;
}
public function getToolMenuItemLink($tool, $item)
{
return $this->toolsMenu[$tool]['menu'][$item]['html'];
if (isset($this->toolsMenu[$tool]) && isset($this->toolsMenu[$tool]['menu'][$item])) {
return $this->toolsMenu[$tool]['menu'][$item]['html'];
}
return null;
}
public function cleanSVG($content)
@@ -124,17 +124,21 @@
$register_action = $TEMPLATE->getToolMenuItem('user', 'register');
$login_action = $TEMPLATE->getToolMenuItem('user', 'login');
$register_attr = $register_action->getLinkAttributes();
$register_attr['class'] .= ' btn btn-success navbar-btn';
if ($register_action) {
$register_html = '<a '. buildAttributes($register_attr) . '>';
$register_html .= \inlineSVG($register_action->getSvg());
$register_html .= '<span class="'. (in_array('register', $navbar_labels) ? null : 'sr-only') .'"> ' . hsc($register_action->getLabel()) . '</span>';
$register_html .= "</a>";
$register_attr = $register_action->getLinkAttributes();
$register_attr['class'] .= ' btn btn-success navbar-btn';
echo $register_html;
$register_html = '<a '. buildAttributes($register_attr) . '>';
$register_html .= \inlineSVG($register_action->getSvg());
$register_html .= '<span class="'. (in_array('register', $navbar_labels) ? null : 'sr-only') .'"> ' . hsc($register_action->getLabel()) . '</span>';
$register_html .= "</a>";
if (! $TEMPLATE->getConf('hideLoginLink')) {
echo $register_html;
}
if (! $TEMPLATE->getConf('hideLoginLink') && $login_action) {
$login_attr = $login_action->getLinkAttributes();
$login_attr['class'] .= ' btn btn-default navbar-btn';

0 comments on commit 4d8b021

Please sign in to comment.
You can’t perform that action at this time.