From 275a1c6574fa67a30487323cab328ce921494f1f Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 2 Feb 2017 06:06:23 +0000 Subject: [PATCH] Preparation to add the social network "pnut" --- boot.php | 2 ++ include/contact_selectors.php | 1 + include/contact_widgets.php | 3 +++ 3 files changed, 6 insertions(+) diff --git a/boot.php b/boot.php index a58b41f42..993c15bca 100644 --- a/boot.php +++ b/boot.php @@ -245,6 +245,7 @@ define ( 'NETWORK_STATUSNET', 'stac'); // Statusnet connector define ( 'NETWORK_APPNET', 'apdn'); // app.net define ( 'NETWORK_NEWS', 'nntp'); // Network News Transfer Protocol define ( 'NETWORK_ICALENDAR', 'ical'); // iCalendar +define ( 'NETWORK_PNUT', 'pnut'); // pnut.io define ( 'NETWORK_PHANTOM', 'unkn'); // Place holder /** @}*/ @@ -274,6 +275,7 @@ $netgroup_ids = array( NETWORK_APPNET => (-17), NETWORK_NEWS => (-18), NETWORK_ICALENDAR => (-19), + NETWORK_PNUT => (-20), NETWORK_PHANTOM => (-127), ); diff --git a/include/contact_selectors.php b/include/contact_selectors.php index 6b827baf3..62d79d877 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -89,6 +89,7 @@ function network_to_name($s, $profile = "") { NETWORK_TWITTER => t('Twitter'), NETWORK_DIASPORA2 => t('Diaspora Connector'), NETWORK_STATUSNET => t('GNU Social'), + NETWORK_PNUT => t('pnut'), NETWORK_APPNET => t('App.net') ); diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 1e35db2c7..d077a065e 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -66,6 +66,9 @@ function unavailable_networks() { if (!get_config("system","diaspora_enabled")) $networks[] = NETWORK_DIASPORA; + if (!plugin_enabled("pnut")) + $networks[] = NETWORK_PNUT; + if (!sizeof($networks)) return "";