diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-25 13:23:59 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-25 13:23:59 -0700 |
commit | a7cdf32df541bf73a47f1255b3e9f0a22c4724b4 (patch) | |
tree | 3e9ccc85b87d496b5961dd139608937750e99369 | |
parent | c96572c0909793fd1f38def21f2577e13d98766d (diff) |
max public page
-rw-r--r-- | actions/public.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actions/public.php b/actions/public.php index 27153f131..9851285c4 100644 --- a/actions/public.php +++ b/actions/public.php @@ -35,6 +35,10 @@ require_once INSTALLDIR.'/lib/publicgroupnav.php'; require_once INSTALLDIR.'/lib/noticelist.php'; require_once INSTALLDIR.'/lib/feedlist.php'; +// Farther than any human will go + +define('MAX_PUBLIC_PAGE', 100); + /** * Action for displaying the public stream * @@ -74,6 +78,10 @@ class PublicAction extends Action parent::prepare($args); $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()); return true; |