diff options
author | friendica <info@friendica.com> | 2012-01-08 02:08:20 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-08 02:08:20 -0800 |
commit | df0f7ef560ddd1e62e52fce008c4d8c661e50f38 (patch) | |
tree | 8b8bb44eee2c93f3ee931a245b8750a290178254 /include | |
parent | 5c72ead74ec0b631b4556f8789c9b4c6bc90eb17 (diff) | |
download | volse-hubzilla-df0f7ef560ddd1e62e52fce008c4d8c661e50f38.tar.gz volse-hubzilla-df0f7ef560ddd1e62e52fce008c4d8c661e50f38.tar.bz2 volse-hubzilla-df0f7ef560ddd1e62e52fce008c4d8c661e50f38.zip |
make network_to_name extensible
Diffstat (limited to 'include')
-rw-r--r-- | include/contact_selectors.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/contact_selectors.php b/include/contact_selectors.php index 3211a0e58..4b3ca987a 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -72,9 +72,24 @@ function contact_poll_interval($current, $disabled = false) { function network_to_name($s) { - call_hooks('network_to_name', $s); + $nets = array( + NETWORK_DFRN => t('Friendica'), + NETWORK_OSTATUS => t('OStatus'), + NETWORK_FEED => t('RSS/Atom'), + NETWORK_MAIL => t('Email'), + NETWORK_DIASPORA => t('Diaspora'), + NETWORK_FACEBOOK => t('Facebook'), + NETWORK_ZOT => t('Zot!'), + NETWORK_LINKEDIN => t('LinkedIn'), + NETWORK_XMPP => t('XMPP/IM'), + NETWORK_MYSPACE => t('MySpace'), + ); + + call_hooks('network_to_name', $nets); + + $search = array_keys($nets); + $replace = array_values($nets); - return str_replace(array(NETWORK_DFRN,NETWORK_OSTATUS,NETWORK_FEED,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_FACEBOOK,NETWORK_ZOT,NETWORK_LINKEDIN,NETWORK_XMPP,NETWORK_MYSPACE), - array( t('Friendica'), t('OStatus'), t('RSS/Atom'), t('Email'), t('Diaspora'), t('Facebook'), t('Zot!'), t('LinkedIn'), t('XMPP/IM'), t('MySpace')),$s); + return str_replace($search,$replace,$s); } |