From a76f0676317058a8c1e2fd14ac04c7cabcbed6a7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 9 Feb 2011 13:46:48 -0800 Subject: [PATCH] Partial revert of 073f3e99: restores the original non-hashbang URLs for twitter users as the remote profile. Should fix issue #3027: twitter user avatars not getting imported. Due to the change in URI, all twitter users that had been previously seen were getting new profile entries, which tried to save the same avatar. This would fail as Avatar.url has a unique index. Note: now anything new seen in the last couple days in production will still potentially conflict. --- plugins/TwitterBridge/twitter.php | 2 +- plugins/TwitterBridge/twitterimport.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php index a993f8ff8f..e8d11f3b6a 100644 --- a/plugins/TwitterBridge/twitter.php +++ b/plugins/TwitterBridge/twitter.php @@ -45,7 +45,7 @@ function add_twitter_user($twitter_id, $screen_name) $fuser = new Foreign_user(); $fuser->nickname = $screen_name; - $fuser->uri = 'http://twitter.com/#!/' . $screen_name; + $fuser->uri = 'http://twitter.com/' . $screen_name; $fuser->id = $twitter_id; $fuser->service = TWITTER_SERVICE; $fuser->created = common_sql_now(); diff --git a/plugins/TwitterBridge/twitterimport.php b/plugins/TwitterBridge/twitterimport.php index 3a4c0c43c0..475a99efac 100644 --- a/plugins/TwitterBridge/twitterimport.php +++ b/plugins/TwitterBridge/twitterimport.php @@ -264,7 +264,7 @@ class TwitterImport function ensureProfile($user) { // check to see if there's already a profile for this user - $profileurl = 'http://twitter.com/#!/' . $user->screen_name; + $profileurl = 'http://twitter.com/' . $user->screen_name; $profile = $this->getProfileByUrl($user->screen_name, $profileurl); if (!empty($profile)) { -- 2.39.5