Changeset - 373c6afba371
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-10-29 19:06:30
ohnobinki@ohnopublishing.net
Don't give an irrelavent 404 when there are 0 nonconflicting permutations.
1 file changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
class.schedule.php
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)