diff options
author | Adrian Lang <mail@adrianlang.de> | 2009-08-21 12:13:24 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2009-08-21 12:13:24 +0200 |
commit | 70235d7f05d2ce7dda77af88518612fa005783df (patch) | |
tree | f8722056494597d047c545def94bd82ea1238dcc /actions/remotesubscribe.php | |
parent | b0bb1fff2e79a01b2fa2eece79d2c644860bbb97 (diff) |
Update libomb, fix some omb handling stuff, improve error handling.
Diffstat (limited to 'actions/remotesubscribe.php')
-rw-r--r-- | actions/remotesubscribe.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index 5122c1172..353717beb 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -153,12 +153,11 @@ class RemotesubscribeAction extends Action $this->profile_url = $this->trimmed('profile_url'); if (!$this->profile_url) { - $this->showForm(_('No such user.')); + $this->showForm(_('No such user')); return; } - if (!Validate::uri($this->profile_url, - array('allowed_schemes' => array('http', 'https')))) { + if (!common_valid_http_url($this->profile_url)) { $this->showForm(_('Invalid profile URL (bad format)')); return; } @@ -176,14 +175,14 @@ class RemotesubscribeAction extends Action if ($service->getServiceURI(OAUTH_ENDPOINT_REQUEST) == common_local_url('requesttoken') || User::staticGet('uri', $service->getRemoteUserURI())) { - $this->showForm(_('That\'s a local profile! Login to subscribe.')); + $this->showForm(_('That’s a local profile! Login to subscribe.')); return; } try { $service->requestToken(); } catch (OMB_RemoteServiceException $e) { - $this->showForm(_('Couldn\'t get a request token.')); + $this->showForm(_('Couldn’t get a request token.')); return; } |