Use HTTPS for links to Twitter profiles as well
This commit is contained in:
parent
d1f1063900
commit
439b466979
@ -241,6 +241,16 @@ class TwitterImport
|
|||||||
protected function ensureProfile($twuser)
|
protected function ensureProfile($twuser)
|
||||||
{
|
{
|
||||||
// check to see if there's already a profile for this user
|
// check to see if there's already a profile for this user
|
||||||
|
$profileurl = 'https://twitter.com/' . $twuser->screen_name;
|
||||||
|
try {
|
||||||
|
$profile = $this->getProfileByUrl($twuser->screen_name, $profileurl);
|
||||||
|
$this->updateAvatar($twuser, $profile);
|
||||||
|
return $profile;
|
||||||
|
} catch (NoResultException $e) {
|
||||||
|
common_debug(__METHOD__ . ' - Falling back to check for http: ' .
|
||||||
|
"for Twitter user: $profileurl.");
|
||||||
|
}
|
||||||
|
|
||||||
$profileurl = 'http://twitter.com/' . $twuser->screen_name;
|
$profileurl = 'http://twitter.com/' . $twuser->screen_name;
|
||||||
try {
|
try {
|
||||||
$profile = $this->getProfileByUrl($twuser->screen_name, $profileurl);
|
$profile = $this->getProfileByUrl($twuser->screen_name, $profileurl);
|
||||||
@ -527,9 +537,9 @@ class TwitterImport
|
|||||||
static function atLink($screenName, $fullName, $orig)
|
static function atLink($screenName, $fullName, $orig)
|
||||||
{
|
{
|
||||||
if (!empty($fullName)) {
|
if (!empty($fullName)) {
|
||||||
return "<a href='http://twitter.com/#!/{$screenName}' title='{$fullName}'>{$orig}</a>";
|
return "<a href='https://twitter.com/{$screenName}' title='{$fullName}'>{$orig}</a>";
|
||||||
} else {
|
} else {
|
||||||
return "<a href='http://twitter.com/#!/{$screenName}'>{$orig}</a>";
|
return "<a href='https://twitter.com/{$screenName}'>{$orig}</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user