diff options
author | Eric Helgeson <erichelgeson@gmail.com> | 2009-11-16 14:59:32 -0500 |
---|---|---|
committer | Eric Helgeson <erichelgeson@gmail.com> | 2009-11-16 15:00:36 -0500 |
commit | e14c88f6c52fddeeb26c71f13e93db7a8fabdd3b (patch) | |
tree | 3c6a30a1aaa779d4419aacaf88d57ac4dd291cfb /actions/apitimelinegroup.php | |
parent | b7a08fdacc91c783b1e99f5dda2f3ce31ec8a6ee (diff) |
Consistant error for groups that dont exist in API
Diffstat (limited to 'actions/apitimelinegroup.php')
-rw-r--r-- | actions/apitimelinegroup.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index f25f6ba51..de13e7eb9 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -69,7 +69,6 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction parent::prepare($args); $this->group = $this->getTargetGroup($this->arg('id')); - $this->notices = $this->getNotices(); return true; } @@ -87,6 +86,13 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction function handle($args) { parent::handle($args); + + if (empty($this->group)) { + $this->clientError(_('Group not found!'), 404, $this->format); + return false; + } + + $this->notices = $this->getNotices(); $this->showTimeline(); } |