X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnav.php;h=3c7c932e28f6b5214214d2be10177dcb06125a9f;hb=34815de99c548b61c94b6e6939edd485eca728d6;hp=fe4c50818ea583c3e02768b8b4ead0866fdb9422;hpb=b067a1114679ebc3dc6132759c511c3ac8b73e49;p=friendica.git diff --git a/include/nav.php b/include/nav.php index fe4c50818e..3c7c932e28 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,5 +1,7 @@ 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) {