summaryrefslogtreecommitdiff
path: root/actions/public.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-26 15:42:37 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-26 15:42:37 +0800
commit71dc910a53eb2aba509c418e7ac0f8e9b94cba9a (patch)
treebf7299e5e55e69dc859a50df563e8ae59b56d4b4 /actions/public.php
parent65f784120b45dc187e28313fa2c2dca2c976c150 (diff)
parent97ee517680979bf12e82eab99ecf943712fe97c9 (diff)
Merge branch '0.8.x' into notice-search-no-results
Diffstat (limited to 'actions/public.php')
-rw-r--r--actions/public.php8
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;