X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Factions%2Fostatussub.php;h=28714514f5ec402827bfd9cbe4df06fee5e26cc6;hb=b69936498238b3bb92e7e388aea55188f87c796b;hp=65dee2392f570e72b08e512ff9ccdc240dd28721;hpb=b8001ea1079c4c8895fd2323e1e4a47c0d71fde3;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index 65dee2392f..28714514f5 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -149,7 +149,7 @@ class OStatusSubAction extends Action $fullname = $entity->fullname; $homepage = $entity->homepage; $location = $entity->location; - + if (!$avatar) { $avatar = Avatar::defaultImage(AVATAR_PROFILE_SIZE); } @@ -242,7 +242,7 @@ class OStatusSubAction extends Action if (Validate::email($this->profile_uri)) { $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri); } else if (Validate::uri($this->profile_uri)) { - $this->oprofile = Ostatus_profile::ensureProfile($this->profile_uri); + $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri); } else { $this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname"); common_debug('Invalid address format.', __FILE__); @@ -299,7 +299,7 @@ class OStatusSubAction extends Action if ($user->isSubscribed($local)) { // TRANS: OStatus remote subscription dialog error. $this->showForm(_m('Already subscribed!')); - } elseif ($this->oprofile->subscribeLocalToRemote($user)) { + } elseif (Subscription::start($user, $local)) { $this->success(); } else { // TRANS: OStatus remote subscription dialog error. @@ -339,7 +339,6 @@ class OStatusSubAction extends Action } } - /** * Handle posts to this form * @@ -447,4 +446,18 @@ class OStatusSubAction extends Action { return common_local_url('ostatussub'); } + + /** + * Disable the send-notice form at the top of the page. + * This is really just a hack for the broken CSS in the Cloudy theme, + * I think; copying from other non-notice-navigation pages that do this + * as well. There will be plenty of others also broken. + * + * @fixme fix the cloudy theme + * @fixme do this in a more general way + */ + function showNoticeForm() { + // nop + } + }