From 3453521c9c235d8e99d959469aa5c08ca5d6e5fb Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 19 Apr 2017 11:41:34 +0200 Subject: [PATCH] Less frightening interface on remote subscription Instead of an error message in a red box about being unable to find the profile, you get the title "Remote subscription" and no error message. --- plugins/OStatus/actions/ostatussub.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index 7531bb6886..919737ba28 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -245,8 +245,9 @@ class OStatusSubAction extends Action try { $this->profile_uri = Discovery::normalize($this->trimmed('profile')); } catch (Exception $e) { - $this->profile_uri = null; + return false; } + try { if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) { $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri); @@ -391,7 +392,7 @@ class OStatusSubAction extends Action function title() { // TRANS: Page title for OStatus remote subscription form. - return _m('Confirm'); + return !empty($this->profile_uri) ? _m('Confirm') : _m('Remote subscription'); } /** -- 2.39.5