From: Michael Vogel Date: Tue, 7 Aug 2018 15:06:51 +0000 (+0200) Subject: Facebook and App.net is removed from nearly all places (#5581) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c2efa6df43c3895eb571869621fb7687bdfc404;p=friendica.git Facebook and App.net is removed from nearly all places (#5581) * Facebook is removed from nearly all places * Remove app.net as well - it's dead for some time now --- diff --git a/boot.php b/boot.php index d5ada81354..ab73c6dedd 100644 --- 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), diff --git a/mod/contacts.php b/mod/contacts.php index 3650939cc0..c5a43d4f2c 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -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') : ''), diff --git a/mod/item.php b/mod/item.php index 0f2ef536d8..685a16143d 100644 --- a/mod/item.php +++ b/mod/item.php @@ -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"]; } } diff --git a/mod/statistics_json.php b/mod/statistics_json.php index c197060ff5..da95d5379c 100644 --- a/mod/statistics_json.php +++ b/mod/statistics_json.php @@ -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"]; diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index e136b8a561..07eeda4234 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -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); diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 76f8a8c2d8..bad25a0ade 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1003,16 +1003,13 @@ class BBCode extends BaseObject case 5: $text = $preshare . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ":
" . $share[3]; break; - case 6: // app.net - $text = $preshare . ">> @" . $userid_compact . ":
" . $share[3]; - break; case 7: // statusnet/GNU Social $text = $preshare . html_entity_decode("♲ ", 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("♲ ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ":
" . $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 * diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index d6e699ed7b..4ec85b046b 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -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; diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 0e26a9abab..cc98a8d817 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -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; } diff --git a/src/Core/ACL.php b/src/Core/ACL.php index 99bda66a5d..11af99af66 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -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? diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 13aa093336..94a2c11409 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -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'].')'); } diff --git a/src/Model/ItemContent.php b/src/Model/ItemContent.php index c17625a756..250400ef42 100644 --- a/src/Model/ItemContent.php +++ b/src/Model/ItemContent.php @@ -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) { diff --git a/src/Worker/DiscoverPoCo.php b/src/Worker/DiscoverPoCo.php index 4b3474728c..89b3a0a115 100644 --- a/src/Worker/DiscoverPoCo.php +++ b/src/Worker/DiscoverPoCo.php @@ -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"])]);