]> git.mxchange.org Git - friendica.git/blobdiff - mod/unfollow.php
Make frio more consistent by replacing textual links with icons everywhere. (#5415)
[friendica.git] / mod / unfollow.php
index a26557a9a2157339a9ca70a0e95eb4a5747ca067..545faf8fdae90c3bb721f39975fcc14f543c29e0 100644 (file)
@@ -2,9 +2,11 @@
 /**
  * @file mod/unfollow.php
  */
+
 use Friendica\App;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
+use Friendica\Database\DBA;
 use Friendica\Database\DBM;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
@@ -28,7 +30,7 @@ function unfollow_post(App $a)
        $condition = ["`uid` = ? AND `rel` = ? AND (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
                        $uid, CONTACT_IS_FRIEND, normalise_link($url),
                        normalise_link($url), $url, NETWORK_STATUSNET];
-       $contact = dba::selectFirst('contact', [], $condition);
+       $contact = DBA::selectFirst('contact', [], $condition);
 
        if (!DBM::is_result($contact)) {
                notice(L10n::t("Contact wasn't found or can't be unfollowed."));
@@ -42,7 +44,7 @@ function unfollow_post(App $a)
                                Contact::terminateFriendship($r[0], $contact);
                        }
                }
-               dba::update('contact', ['rel' => CONTACT_IS_FOLLOWER], ['id' => $contact['id']]);
+               DBA::update('contact', ['rel' => CONTACT_IS_FOLLOWER], ['id' => $contact['id']]);
 
                info(L10n::t('Contact unfollowed').EOL);
                goaway(System::baseUrl().'/contacts/'.$contact['id']);
@@ -67,7 +69,7 @@ function unfollow_content(App $a)
        $condition = ["`uid` = ? AND `rel` = ? AND (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
                        local_user(), CONTACT_IS_FRIEND, normalise_link($url),
                        normalise_link($url), $url, NETWORK_STATUSNET];
-       $contact = dba::selectFirst('contact', ['url', 'network', 'addr', 'name'], $condition);
+       $contact = DBA::selectFirst('contact', ['url', 'network', 'addr', 'name'], $condition);
 
        if (!DBM::is_result($contact)) {
                notice(L10n::t("You aren't a friend of this contact.").EOL);
@@ -118,7 +120,7 @@ function unfollow_content(App $a)
                        '$nickname' => "",
                        '$name' => $contact["name"],
                        '$url' => $contact["url"],
-                       '$zrl' => Profile::zrl($contact["url"]),
+                       '$zrl' => Contact::magicLink($contact["url"]),
                        '$url_label' => L10n::t("Profile URL"),
                        '$myaddr' => $myaddr,
                        '$request' => $request,