X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapitimelinegroup.php;h=de13e7eb9871b95c3ed5d90b869aa236db08e200;hb=c899e4a84ee45b65950980ccb87e52129871d58e;hp=5d05429185f4647a3192048942bee9f9c40a9ab5;hpb=870b091693531ba9aca20a0b0fa64ec326d72725;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index 5d05429185..de13e7eb98 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -34,7 +34,7 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; +require_once INSTALLDIR . '/lib/apiprivateauth.php'; /** * Returns the most recent notices (default 20) posted to the group specified by ID @@ -49,7 +49,7 @@ require_once INSTALLDIR . '/lib/api.php'; * @link http://status.net/ */ -class ApiTimelineGroupAction extends ApiAction +class ApiTimelineGroupAction extends ApiPrivateAuthAction { var $group = null; @@ -69,7 +69,6 @@ class ApiTimelineGroupAction extends ApiAction parent::prepare($args); $this->group = $this->getTargetGroup($this->arg('id')); - $this->notices = $this->getNotices(); return true; } @@ -87,6 +86,13 @@ class ApiTimelineGroupAction extends ApiAction 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(); }