# HG changeset patch # User Nathan Phillip Brink # Date 2010-10-29 19:06:30 # Node ID 373c6afba3716fea84f5fd4d0883bf0e593cbab9 # Parent 26d68cb46254a7bdf5bc28055c450fbea5409a3a Don't give an irrelavent 404 when there are 0 nonconflicting permutations. diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -202,7 +202,12 @@ class Schedule $page = 0; if (isset($_REQUEST['page'])) $page = $_REQUEST['page']; - if ($page >= $npages) + /* + * only display the ``this page doesn't exist'' 404 if there is at + * least one permutation. Otherwise, we give an irrelevant 404 for + * users with no permutations. + */ + if ($this->nPermutations && $page >= $npages) Page::show_404('Unable to find page ' . $page . ', there are only ' . $this->nPermutations . ' non-conflicting permutations, for a total of ' . $npages . ' pages.'); /* zero-based */ $first_permutation = $page * SP_PERMUTATIONS_PER_PAGE;