]> git.mxchange.org Git - friendica.git/blobdiff - include/nav.php
Code standards in api_get_user
[friendica.git] / include / nav.php
index 478213b4e0906cde3e75041f6bb1cdf33069e40f..58ec150e7ad21bbbdbadaee68240e908b8f92ae6 100644 (file)
@@ -1,8 +1,12 @@
 <?php
-
+/**
+ * @file include/nav.php
+ */
 use Friendica\App;
+use Friendica\Content\Feature;
 use Friendica\Core\Config;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 function nav(App $a) {
 
@@ -92,7 +96,7 @@ function nav_info(App $a)
                // user info
                $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['micro']) : 'images/person-48.jpg'),
+                       'icon' => (DBM::is_result($r) ? $a->remove_baseurl($r['micro']) : 'images/person-48.jpg'),
                        'name' => $a->user['username'],
                );
        } else {
@@ -189,7 +193,7 @@ function nav_info(App $a)
 
                $nav['settings'] = array('settings', t('Settings'), '', t('Account settings'));
 
-               if (feature_enabled(local_user(), 'multi_profiles')) {
+               if (Feature::isEnabled(local_user(), 'multi_profiles')) {
                        $nav['profiles'] = array('profiles', t('Profiles'), '', t('Manage/Edit Profiles'));
                }
 
@@ -205,7 +209,7 @@ function nav_info(App $a)
 
        // Provide a banner/logo/whatever
        $banner = Config::get('system', 'banner');
-       if ($banner === false) {
+       if (is_null($banner)) {
                $banner = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
        }