]> git.mxchange.org Git - friendica.git/commitdiff
Preparations for the upcoming bidirectional twitter sync.
authorMichael Vogel <icarus@dabo.de>
Sat, 12 Oct 2013 06:29:39 +0000 (08:29 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 12 Oct 2013 06:29:39 +0000 (08:29 +0200)
include/bbcode.php
include/contact_selectors.php

index 0f8c2df74ebc225c4bb905aa9950e9bfcc5bff25..f74c86b50afbc73f078316604b5f1fe82d42017d 100644 (file)
@@ -349,6 +349,10 @@ function GetProfileUsername($profile, $username) {
        if ($diaspora != $profile)
                return($diaspora);
 
+       $twitter = preg_replace("=https?://twitter.com/(.*)=ism", "$1@twitter.com", $profile);
+       if ($twitter != $profile)
+               return($twitter);
+
        $StatusnetHost = preg_replace("=https?://(.*)/user/(.*)=ism", "$1", $profile);
        if ($StatusnetHost != $profile) {
                $StatusnetUser = preg_replace("=https?://(.*)/user/(.*)=ism", "$2", $profile);
index 44ff7ab04079f95424d65c66d310ff9551f187c3..5e35ecd7e1df41faaa9f2563d1a60f3a23ad111e 100644 (file)
@@ -85,7 +85,8 @@ function network_to_name($s) {
                NETWORK_MYSPACE  => t('MySpace'),
                NETWORK_MAIL2    => t('Email'),
                NETWORK_GPLUS    => t('Google+'),
-               NETWORK_PUMPIO   => t('pump.io')
+               NETWORK_PUMPIO   => t('pump.io'),
+               NETWORK_TWITTER  => t('Twitter')
        );
 
        call_hooks('network_to_name', $nets);