From fb714f9e724115993977b7a26acdda93bf84f605 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 27 Aug 2012 22:27:36 -0700 Subject: recover frankentheme --- include/nav.php | 11 +++--- view/theme/duepuntozero/tpl/nav.tpl | 70 ------------------------------------- 2 files changed, 6 insertions(+), 75 deletions(-) delete mode 100644 view/theme/duepuntozero/tpl/nav.tpl diff --git a/include/nav.php b/include/nav.php index 318512373..2a4333011 100644 --- a/include/nav.php +++ b/include/nav.php @@ -27,7 +27,7 @@ function nav(&$a) { * */ - $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : ''); + $myident = ((is_array($a->identity) && isset($a->identity['entity_address'])) ? $a->identity['entity_address'] . '@' : ''); $sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 ); @@ -53,10 +53,10 @@ function nav(&$a) { $nav['usermenu'][] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); // user info - $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); +// $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); $userinfo = array( - 'icon' => (count($r) ? $a->get_cached_avatar_image($r[0]['micro']) : $a->get_baseurl($ssl_state)."/images/person-48.jpg"), - 'name' => $a->user['username'], + 'icon' => $a->get_baseurl($ssl_state)."/images/person-48.jpg", + 'name' => $a->identity['entity_name'], ); } @@ -117,7 +117,8 @@ function nav(&$a) { /* only show friend requests for normal pages. Other page types have automatic friendship. */ - if($_SESSION['page_flags'] == PAGE_NORMAL || $_SESSION['page_flags'] == PAGE_PRVGROUP) { +// if($_SESSION['page_flags'] == PAGE_NORMAL || $_SESSION['page_flags'] == PAGE_PRVGROUP) { + if($a->identity['entity_pageflags'] == PAGE_NORMAL) { $nav['introductions'] = array('notifications/intros', t('Introductions'), "", t('Friend Requests')); $nav['notifications'] = array('notifications', t('Notifications'), "", t('Notifications')); $nav['notifications']['all']=array('notifications/system', t('See all notifications'), "", ""); diff --git a/view/theme/duepuntozero/tpl/nav.tpl b/view/theme/duepuntozero/tpl/nav.tpl deleted file mode 100644 index 3029ce9bd..000000000 --- a/view/theme/duepuntozero/tpl/nav.tpl +++ /dev/null @@ -1,70 +0,0 @@ - - - -- cgit v1.2.3