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
This commit is contained in:
parent
e62c1c3f81
commit
8c2efa6df4
12 changed files with 12 additions and 41 deletions
2
boot.php
2
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),
|
||||
|
|
|
@ -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') : ''),
|
||||
|
|
|
@ -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"];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1003,16 +1003,13 @@ class BBCode extends BaseObject
|
|||
case 5:
|
||||
$text = $preshare . html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8') . ' ' . $userid_compact . ": <br />" . $share[3];
|
||||
break;
|
||||
case 6: // app.net
|
||||
$text = $preshare . ">> @" . $userid_compact . ": <br />" . $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 . ": <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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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'].')');
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"])]);
|
||||
|
|
Loading…
Reference in a new issue