Skip to content

Commit

Permalink
Handle custom main menu options with FQDN
Browse files Browse the repository at this point in the history
Issue #21397
Issue #21414
  • Loading branch information
vboctor committed Aug 28, 2016
1 parent 4e6b44d commit 05a9a9c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/layout_api.php
Expand Up @@ -906,7 +906,15 @@ function layout_sidebar_menu( $p_page, $p_title, $p_icon, $p_active_sidebar_page
} else {
echo '<li>' . "\n";
}
echo '<a href="' . helper_mantis_url( $p_page ) . '">' . "\n";

# Handle relative / absolute urls
if ( stripos( $p_page, 'https:' ) === 0 || stripos( $p_page, 'http:' ) === 0 ) {
$t_url = $p_page;
} else {
$t_url = helper_mantis_url( $p_page );
}

echo '<a href="' . $t_url . '">' . "\n";
echo '<i class="menu-icon fa ' . $p_icon . '"></i> ' . "\n";
echo '<span class="menu-text"> ' . lang_get_defaulted( $p_title ) . ' </span>' . "\n";
echo '</a>' . "\n";
Expand Down

0 comments on commit 05a9a9c

Please sign in to comment.