X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Funfollow.php;h=545faf8fdae90c3bb721f39975fcc14f543c29e0;hb=303aef34f0804f9becc10610ae85985835f9d9bf;hp=9ee92b3ba9ed7fff5ace231e4a43907697ace40f;hpb=4e44b07dfe07dde78fe8a095fbb43d9ec1ffcb53;p=friendica.git diff --git a/mod/unfollow.php b/mod/unfollow.php index 9ee92b3ba9..545faf8fda 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -6,7 +6,7 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\System; -use Friendica\Database\dba; +use Friendica\Database\DBA; use Friendica\Database\DBM; use Friendica\Model\Contact; use Friendica\Model\Profile; @@ -30,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.")); @@ -44,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']); @@ -69,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);