]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile.php
Make frio more consistent by replacing textual links with icons everywhere. (#5415)
[friendica.git] / mod / profile.php
index 93172397b276cd1a2165c30a2b85c8ae8dfaaa60..9550fe25e1776f862de48d01644162f0ad3e4525 100644 (file)
@@ -12,6 +12,7 @@ use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 use Friendica\Core\System;
+use Friendica\Database\DBA;
 use Friendica\Database\DBM;
 use Friendica\Model\Group;
 use Friendica\Model\Item;
@@ -79,7 +80,7 @@ function profile_init(App $a)
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/" title="' . L10n::t('%s\'s posts', $a->profile['username']) . '"/>' . "\r\n";
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/comments" title="' . L10n::t('%s\'s comments', $a->profile['username']) . '"/>' . "\r\n";
        $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . System::baseUrl() . '/feed/' . $which . '/activity" title="' . L10n::t('%s\'s timeline', $a->profile['username']) . '"/>' . "\r\n";
-       $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . ($a->path ? '/' . $a->path : ''));
+       $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . ($a->urlpath ? '/' . $a->urlpath : ''));
        $a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
        header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
 
@@ -282,6 +283,8 @@ function profile_content(App $a, $update = 0)
 
                if (!DBM::is_result($r)) {
                        $sql_extra3 = sprintf(" AND `thread`.`contact-id` = %d ", intval(intval($a->profile['contact_id'])));
+               } else {
+                       $sql_extra3 = "";
                }
 
                //  check if we serve a mobile device and get the user settings
@@ -344,7 +347,7 @@ function profile_content(App $a, $update = 0)
 
 
        if ($is_owner) {
-               $unseen = dba::exists('item', ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
+               $unseen = DBA::exists('item', ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
                if ($unseen) {
                        $r = Item::update(['unseen' => false],
                                        ['wall' => true, 'unseen' => true, 'uid' => local_user()]);