summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/subscribe.php2
-rw-r--r--lib/util.php3
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php2
3 files changed, 5 insertions, 2 deletions
diff --git a/actions/subscribe.php b/actions/subscribe.php
index 3745311b6..b1243f393 100644
--- a/actions/subscribe.php
+++ b/actions/subscribe.php
@@ -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');
diff --git a/lib/util.php b/lib/util.php
index d1c78f7d0..8381bc63c 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -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);
}
}
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index 7026d82f2..5c082e5c6 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -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);