summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-06-26 00:48:13 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-06-26 00:48:13 +0000
commit4a90c3c3adf3f91eac3f5d569caa11108f5f850f (patch)
tree794c893a93a292b0f81d0219618738d5b5f753db
parentc4da201fc01206817034207c01d9e2d051605757 (diff)
parentb53b6b8769d5531c16ba58d4560119bcee8b39ff (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
-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;