git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 3453521c authored by mmn's avatar mmn

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.
parent 2744bdcd
...@@ -245,8 +245,9 @@ class OStatusSubAction extends Action ...@@ -245,8 +245,9 @@ class OStatusSubAction extends Action
try { try {
$this->profile_uri = Discovery::normalize($this->trimmed('profile')); $this->profile_uri = Discovery::normalize($this->trimmed('profile'));
} catch (Exception $e) { } catch (Exception $e) {
$this->profile_uri = null; return false;
} }
try { try {
if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) { if (Discovery::isAcct($this->profile_uri) && $validate->email(mb_substr($this->profile_uri, 5))) {
$this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri); $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);
...@@ -391,7 +392,7 @@ class OStatusSubAction extends Action ...@@ -391,7 +392,7 @@ class OStatusSubAction extends Action
function title() function title()
{ {
// TRANS: Page title for OStatus remote subscription form. // TRANS: Page title for OStatus remote subscription form.
return _m('Confirm'); return !empty($this->profile_uri) ? _m('Confirm') : _m('Remote subscription');
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment