summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-11-20 16:35:53 +0000
committerAndy Williams <andy@andywilliams.me>2017-11-20 16:35:53 +0000
commit2ed90754d02b1d1803d735bfd49165d0316406b3 (patch)
tree7be50ca35f5ce4e58520c2ec025cd728527be8e7
parent8e9cab6a9246681a9af7670b387eff3e71d48a14 (diff)
layout: Save a little space in the nav bar by only outputting first names
-rw-r--r--public_html/lib/tpl/e/tpl_functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/public_html/lib/tpl/e/tpl_functions.php b/public_html/lib/tpl/e/tpl_functions.php
index 318e56d0..b6c86a05 100644
--- a/public_html/lib/tpl/e/tpl_functions.php
+++ b/public_html/lib/tpl/e/tpl_functions.php
@@ -195,9 +195,14 @@ function _tpl_output_search_bar()
195 195
196function _tpl_userinfo($element='li') { 196function _tpl_userinfo($element='li') {
197 global $INFO; 197 global $INFO;
198 $names = explode(' ', $INFO['userinfo']['name']);
199 if (count($names))
200 $firstname = $names[0];
201 else
202 $firstname = $INFO['userinfo']['name'];
198 203
199 if(isset($_SERVER['REMOTE_USER'])) { 204 if(isset($_SERVER['REMOTE_USER'])) {
200 echo '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">'.hsc($INFO['userinfo']['name']).'<b class="caret"></b></a>'; 205 echo '<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">'.hsc($firstname).'<b class="caret"></b></a>';
201 echo '<ul class="dropdown-menu">'; 206 echo '<ul class="dropdown-menu">';
202 tpl_action('admin', 1, $element); 207 tpl_action('admin', 1, $element);
203 tpl_action('profile', 1, $element); 208 tpl_action('profile', 1, $element);