X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnav.php;h=3c7c932e28f6b5214214d2be10177dcb06125a9f;hb=71a5de40f105234aa8082844d7839c3e0e49e905;hp=bd933929d3b6b78ee7e8a3113558cd965e3d152d;hpb=b580c238445100e95b2b43343a82d0e5f7a14630;p=friendica.git diff --git a/include/nav.php b/include/nav.php index bd933929d3..3c7c932e28 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,6 +1,8 @@ page,'nav'))) + if (!(x($a->page,'nav'))) $a->page['nav'] = ''; $a->page['htmlhead'] .= replace_macros(get_markup_template('nav_head.tpl'), array()); @@ -86,9 +88,9 @@ function nav_info(App $a) $nav['usermenu'][] = array('notes/', t('Personal notes'), '', t('Your personal notes')); // user info - $r = q("SELECT `micro` FROM `contact` WHERE `uid` = %d AND `self` = 1", intval($a->user['uid'])); + $r = dba::select('contact', array('micro'), array('uid' => $a->user['uid'], 'self' => true), array('limit' => 1)); $userinfo = array( - 'icon' => (dbm::is_result($r) ? $a->remove_baseurl($r[0]['micro']) : 'images/person-48.jpg'), + 'icon' => (dbm::is_result($r) ? $a->remove_baseurl($r['micro']) : 'images/person-48.jpg'), 'name' => $a->user['username'], ); } else { @@ -136,7 +138,7 @@ function nav_info(App $a) if (strlen(get_config('system', 'singleuser'))) { $gdir = get_config('system', 'directory'); - if(strlen($gdir)) { + if (strlen($gdir)) { $gdirpath = zrl($gdir, true); } } elseif (get_config('system', 'community_page_style') == CP_USERS_ON_SERVER) {