Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline: OStatus: if no <link> available and no profileurl hint passed in, use object id if it's an HTTP(S) URL. Fixes profile link for Google accounts. Tweak common_url_to_nickname to take the last path component; fixes pulling nicks from Google profile pages (path is "/profile/<nickname>") Fix bug on subscribe/unsubscribe in profile lists. Bogus call to nonexisting profile->getProfile() was masked by DB_DataObject
This commit is contained in:
commit
82cac2be59
|
@ -145,7 +145,7 @@ class SubscribeAction extends Action
|
|||
$this->element('title', null, _('Subscribed'));
|
||||
$this->elementEnd('head');
|
||||
$this->elementStart('body');
|
||||
$unsubscribe = new UnsubscribeForm($this, $this->other->getProfile());
|
||||
$unsubscribe = new UnsubscribeForm($this, $this->other);
|
||||
$unsubscribe->show();
|
||||
$this->elementEnd('body');
|
||||
$this->elementEnd('html');
|
||||
|
|
|
@ -1698,7 +1698,8 @@ function common_url_to_nickname($url)
|
|||
# Strip starting, ending slashes
|
||||
$path = preg_replace('@/$@', '', $parts['path']);
|
||||
$path = preg_replace('@^/@', '', $path);
|
||||
if (strpos($path, '/') === false) {
|
||||
$path = basename($path);
|
||||
if ($path) {
|
||||
return common_nicknamize($path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1161,6 +1161,8 @@ class Ostatus_profile extends Memcached_DataObject
|
|||
$profile->profileurl = $object->link;
|
||||
} else if (array_key_exists('profileurl', $hints)) {
|
||||
$profile->profileurl = $hints['profileurl'];
|
||||
} else if (Validate::uri($object->id, array('allowed_schemes' => array('http', 'https')))) {
|
||||
$profile->profileurl = $object->id;
|
||||
}
|
||||
|
||||
$profile->bio = self::getActivityObjectBio($object, $hints);
|
||||
|
|
Loading…
Reference in New Issue
Block a user