From: Brion Vibber Date: Wed, 9 Feb 2011 21:46:48 +0000 (-0800) Subject: Partial revert of 073f3e99: restores the original non-hashbang URLs for twitter users... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a76f0676317058a8c1e2fd14ac04c7cabcbed6a7;p=quix0rs-gnu-social.git 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. --- 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)) {