]> git.mxchange.org Git - friendica.git/commitdiff
Facebook and App.net is removed from nearly all places (#5581)
authorMichael Vogel <icarus@dabo.de>
Tue, 7 Aug 2018 15:06:51 +0000 (17:06 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 7 Aug 2018 15:06:51 +0000 (17:06 +0200)
* Facebook is removed from nearly all places

* Remove app.net as well - it's dead for some time now

12 files changed:
boot.php
mod/contacts.php
mod/item.php
mod/statistics_json.php
src/Content/ContactSelector.php
src/Content/Text/BBCode.php
src/Content/Text/HTML.php
src/Content/Widget.php
src/Core/ACL.php
src/Model/GContact.php
src/Model/ItemContent.php
src/Worker/DiscoverPoCo.php

index d5ada81354e5701d8ab583e9dd13ffb206e11aac..ab73c6dedde81357f74c18a0eca353dafc97deb5 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -202,7 +202,6 @@ define('NETWORK_PUMPIO'   , Protocol::PUMPIO);    // pump.io
 define('NETWORK_TWITTER'  , Protocol::TWITTER);   // Twitter
 define('NETWORK_DIASPORA2', Protocol::DIASPORA2); // Diaspora connector
 define('NETWORK_STATUSNET', Protocol::STATUSNET); // Statusnet connector
-define('NETWORK_APPNET'   , Protocol::APPNET);    // app.net - Dead protocol
 define('NETWORK_NEWS'     , Protocol::NEWS);      // Network News Transfer Protocol - Currently unsupported
 define('NETWORK_ICALENDAR', Protocol::ICALENDAR); // iCalendar - Currently unsupported
 define('NETWORK_PNUT'     , Protocol::PNUT);      // pnut.io - Currently unsupported
@@ -232,7 +231,6 @@ $netgroup_ids = [
        NETWORK_TWITTER  => (-14),
        NETWORK_DIASPORA2 => (-15),
        NETWORK_STATUSNET => (-16),
-       NETWORK_APPNET    => (-17),
        NETWORK_NEWS      => (-18),
        NETWORK_ICALENDAR => (-19),
        NETWORK_PNUT      => (-20),
index 3650939cc00b7049206622ff4928978242a3cb60..c5a43d4f2c2fbf26337e404b58e0cd60d14e5b09 100644 (file)
@@ -637,7 +637,7 @@ function contacts_content(App $a)
                        '$contact_id' => $contact['id'],
                        '$block_text' => (($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block') ),
                        '$ignore_text' => (($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore') ),
-                       '$insecure' => (($contact['network'] !== NETWORK_DFRN && $contact['network'] !== NETWORK_MAIL && $contact['network'] !== NETWORK_FACEBOOK && $contact['network'] !== NETWORK_DIASPORA) ? $insecure : ''),
+                       '$insecure' => (($contact['network'] !== NETWORK_DFRN && $contact['network'] !== NETWORK_MAIL && $contact['network'] !== NETWORK_DIASPORA) ? $insecure : ''),
                        '$info' => $contact['info'],
                        '$cinfo' => ['info', '', $contact['info'], ''],
                        '$blocked' => (($contact['blocked']) ? L10n::t('Currently blocked') : ''),
index 0f2ef536d8e7b4323f4fa651f7b76b41f74dd9bc..685a16143de812ea229686e40ea4fc4fd8997b3e 100644 (file)
@@ -1022,7 +1022,7 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
                        $newname = $contact["nick"];
 
                        if (($newname == "") || (($contact["network"] != NETWORK_OSTATUS) && ($contact["network"] != NETWORK_TWITTER)
-                               && ($contact["network"] != NETWORK_STATUSNET) && ($contact["network"] != NETWORK_APPNET))) {
+                               && ($contact["network"] != NETWORK_STATUSNET))) {
                                $newname = $contact["name"];
                        }
                }
index c197060ff5471dc24c38d3aae54232956bac71e7..da95d5379c056f1a62f0ae1cd0913547f56d435f 100644 (file)
@@ -32,7 +32,6 @@ function statistics_json_init(App $a) {
        $statistics["services"]["blogger"] = Addon::isEnabled("blogger");
        $statistics["services"]["buffer"] = Addon::isEnabled("buffer");
        $statistics["services"]["dreamwidth"] = Addon::isEnabled("dwpost");
-       $statistics["services"]["facebook"] = Addon::isEnabled("fbpost");
        $statistics["services"]["gnusocial"] = Addon::isEnabled("statusnet");
        $statistics["services"]["googleplus"] = Addon::isEnabled("gpluspost");
        $statistics["services"]["libertree"] = Addon::isEnabled("libertree");
@@ -46,7 +45,6 @@ function statistics_json_init(App $a) {
        $statistics["blogger"] = $statistics["services"]["blogger"];
        $statistics["buffer"] = $statistics["services"]["buffer"];
        $statistics["dreamwidth"] = $statistics["services"]["dreamwidth"];
-       $statistics["facebook"] = $statistics["services"]["facebook"];
        $statistics["gnusocial"] = $statistics["services"]["gnusocial"];
        $statistics["googleplus"] = $statistics["services"]["googleplus"];
        $statistics["libertree"] = $statistics["services"]["libertree"];
index e136b8a56183339d76e0e686ba9c106800a61f67..07eeda4234683abad41d966624cc13e3af81bbd7 100644 (file)
@@ -79,7 +79,6 @@ class ContactSelector
                        NETWORK_FEED     => L10n::t('RSS/Atom'),
                        NETWORK_MAIL     => L10n::t('Email'),
                        NETWORK_DIASPORA => L10n::t('Diaspora'),
-                       NETWORK_FACEBOOK => L10n::t('Facebook'),
                        NETWORK_ZOT      => L10n::t('Zot!'),
                        NETWORK_LINKEDIN => L10n::t('LinkedIn'),
                        NETWORK_XMPP     => L10n::t('XMPP/IM'),
@@ -89,8 +88,7 @@ class ContactSelector
                        NETWORK_TWITTER  => L10n::t('Twitter'),
                        NETWORK_DIASPORA2 => L10n::t('Diaspora Connector'),
                        NETWORK_STATUSNET => L10n::t('GNU Social Connector'),
-                       NETWORK_PNUT      => L10n::t('pnut'),
-                       NETWORK_APPNET => L10n::t('App.net')
+                       NETWORK_PNUT      => L10n::t('pnut')
                ];
 
                Addon::callHooks('network_to_name', $nets);
index 76f8a8c2d81ee954b6ab5fad86e14ff737a7fc11..bad25a0aded5d2e45282694e8e83a88c02a4db2c 100644 (file)
@@ -1003,16 +1003,13 @@ class BBCode extends BaseObject
                        case 5:
                                $text = $preshare . html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ": <br />" . $share[3];
                                break;
-                       case 6: // app.net
-                               $text = $preshare . "&gt;&gt; @" . $userid_compact . ": <br />" . $share[3];
-                               break;
                        case 7: // statusnet/GNU Social
                                $text = $preshare . html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . " @" . $userid_compact . ": " . $share[3];
                                break;
                        case 8: // twitter
                                $text = $preshare . "RT @" . $userid_compact . ": " . $share[3];
                                break;
-                       case 9: // Google+/Facebook
+                       case 9: // Google+
                                $text = $preshare . html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ": <br />" . $share[3];
 
                                if ($link != "") {
@@ -1189,11 +1186,11 @@ class BBCode extends BaseObject
         * Simple HTML values meaning:
         * - 0: Friendica display
         * - 1: Unused
-        * - 2: Used for Facebook, Google+, Windows Phone push, Friendica API
+        * - 2: Used for Google+, Windows Phone push, Friendica API
         * - 3: Used before converting to Markdown in bb2diaspora.php
         * - 4: Used for WordPress, Libertree (before Markdown), pump.io and tumblr
         * - 5: Unused
-        * - 6: Used for Appnet
+        * - 6: Unused
         * - 7: Used for dfrn, OStatus
         * - 8: Used for WP backlink text setting
         *
index d6e699ed7b90e0b894419a823c911cdd08de8bcf..4ec85b046b21b4a3432cfc90632ee3f85eb0e2e8 100644 (file)
@@ -520,7 +520,7 @@ class HTML
 
                        // A list of some links that should be ignored
                        $list = ["/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
-                               "//facebook.com/profile.php?id=", "//plus.google.com/", "//twitter.com/"];
+                               "//plus.google.com/", "//twitter.com/"];
                        foreach ($list as $listitem) {
                                if (strpos($treffer[1], $listitem) !== false) {
                                        $ignore = true;
index 0e26a9abab85a026f14013fe79a1a37590d94306..cc98a8d817fae7fee9c3a2003811a1f918be292b 100644 (file)
@@ -81,14 +81,6 @@ class Widget
        {
                $networks = array();
 
-               if (!Addon::isEnabled("appnet")) {
-                       $networks[] = NETWORK_APPNET;
-               }
-
-               if (!Addon::isEnabled("fbpost") && !Addon::isEnabled("facebook")) {
-                       $networks[] = NETWORK_FACEBOOK;
-               }
-
                if (!Addon::isEnabled("statusnet")) {
                        $networks[] = NETWORK_STATUSNET;
                }
index 99bda66a5d2c786f343d74d8a0e440e1ec0ed988..11af99af660a2c69b110b7a488aa2c5e22bc3811 100644 (file)
@@ -49,17 +49,13 @@ class ACL extends BaseObject
                                $networks = [NETWORK_DFRN];
                                break;
                        case 'PRIVATE':
-                               if (!empty($a->user['prvnets'])) {
-                                       $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
-                               } else {
-                                       $networks = [NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA];
-                               }
+                               $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
                                break;
                        case 'TWO_WAY':
                                if (!empty($a->user['prvnets'])) {
                                        $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
                                } else {
-                                       $networks = [NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS];
+                                       $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS];
                                }
                                break;
                        default: /// @TODO Maybe log this call?
index 13aa09333696a31fd63034b6550dc408067fdf5a..94a2c11409448eb2bf0c28b412908c9a2f50c30d 100644 (file)
@@ -151,7 +151,7 @@ class GContact
                        throw new Exception("This (".$gcontact['url'].") doesn't seem to be an url.");
                }
 
-               if (in_array($urlparts["host"], ["www.facebook.com", "facebook.com", "twitter.com", "identi.ca", "alpha.app.net"])) {
+               if (in_array($urlparts["host"], ["twitter.com", "identi.ca"])) {
                        throw new Exception('Contact from a non federated network ignored. ('.$gcontact['url'].')');
                }
 
index c17625a7565aeb84a03991f5a13023a102ed3085..250400ef428d92d08b2aec9e32e078d2d9ebe192 100644 (file)
@@ -73,9 +73,6 @@ class ItemContent extends BaseObject
                                case 7:
                                        $abstract = Text\BBCode::getAbstract($item['body'], NETWORK_STATUSNET);
                                        break;
-                               case 6:
-                                       $abstract = Text\BBCode::getAbstract($item['body'], NETWORK_APPNET);
-                                       break;
                                default: // We don't know the exact target.
                                        // We fetch an abstract since there is a posting limit.
                                        if ($limit > 0) {
index 4b3474728ca23f1c790b78cbcb71901a175b9cb7..89b3a0a115f1ea4a57f8cd71c5ea3e3bc3da9d6f 100644 (file)
@@ -164,13 +164,8 @@ class DiscoverPoCo
                                continue;
                         }
 
-                       if (in_array($urlparts["host"], ["www.facebook.com", "facebook.com", "twitter.com",
-                                                               "identi.ca", "alpha.app.net"])) {
-                               $networks = ["www.facebook.com" => NETWORK_FACEBOOK,
-                                               "facebook.com" => NETWORK_FACEBOOK,
-                                               "twitter.com" => NETWORK_TWITTER,
-                                               "identi.ca" => NETWORK_PUMPIO,
-                                               "alpha.app.net" => NETWORK_APPNET];
+                       if (in_array($urlparts["host"], ["twitter.com", "identi.ca"])) {
+                               $networks = ["twitter.com" => NETWORK_TWITTER, "identi.ca" => NETWORK_PUMPIO];
 
                                DBA::update('gcontact', ['network' => $networks[$urlparts["host"]]],
                                        ['nurl' => normalise_link($user["url"])]);