diff options
author | Evan Prodromou <evan@status.net> | 2009-12-01 12:11:05 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-01 12:11:05 -0500 |
commit | 42da45d3bc3cd0caa34f8d9f34c5617fedbb755e (patch) | |
tree | 4bb8483ad921fd1c03b0f4043d541dff1a812d50 /actions/finishremotesubscribe.php | |
parent | 11d9c1955c9a7d65cb3dc76098abd3e4350d2685 (diff) | |
parent | 234e6a10b1b95b271bacd11687e1dcb168712147 (diff) |
Merge branch 'master' of git@gitorious.org:statusnet/mainline
Diffstat (limited to 'actions/finishremotesubscribe.php')
-rw-r--r-- | actions/finishremotesubscribe.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index b1cec66f4..deee70f36 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -89,12 +89,16 @@ class FinishremotesubscribeAction extends Action } $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); + if ($remote) { + // Note remote profile may not have been saved yet. + // @fixme not convinced this is correct at all! - $profile = Profile::staticGet($remote->id); + $profile = Profile::staticGet($remote->id); - if ($user->hasBlocked($profile)) { - $this->clientError(_('That user has blocked you from subscribing.')); - return; + if ($user->hasBlocked($profile)) { + $this->clientError(_('That user has blocked you from subscribing.')); + return; + } } /* Perform the handling itself via libomb. */ @@ -122,6 +126,7 @@ class FinishremotesubscribeAction extends Action /* The service URLs are not accessible from datastore, so setting them after insertion of the profile. */ + $remote = Remote_profile::staticGet('uri', $service->getListenerURI()); $orig_remote = clone($remote); $remote->postnoticeurl = |