forked from GNUsocial/gnu-social
max public page
This commit is contained in:
parent
c96572c090
commit
a7cdf32df5
@ -35,6 +35,10 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php';
|
|||||||
require_once INSTALLDIR.'/lib/noticelist.php';
|
require_once INSTALLDIR.'/lib/noticelist.php';
|
||||||
require_once INSTALLDIR.'/lib/feedlist.php';
|
require_once INSTALLDIR.'/lib/feedlist.php';
|
||||||
|
|
||||||
|
// Farther than any human will go
|
||||||
|
|
||||||
|
define('MAX_PUBLIC_PAGE', 100);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action for displaying the public stream
|
* Action for displaying the public stream
|
||||||
*
|
*
|
||||||
@ -74,6 +78,10 @@ class PublicAction extends Action
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
|
||||||
|
|
||||||
|
if ($this->page > MAX_PUBLIC_PAGE) {
|
||||||
|
$this->clientError(sprintf(_("Beyond the page limit (%s)"), MAX_PUBLIC_PAGE));
|
||||||
|
}
|
||||||
|
|
||||||
common_set_returnto($this->selfUrl());
|
common_set_returnto($this->selfUrl());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user