]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/user_functions.php
Simplified some more code:
[mailer.git] / inc / libs / user_functions.php
index 012ff2c6b405016dcbad17e2245f1012d328f2cf..6fa424a99f40ce63c2b3baff3319f14a75ef3da7 100644 (file)
@@ -142,7 +142,7 @@ function addSortLinks ($letter, $sortby, $colspan, $return=false) {
 }
 
 // Add page navigation
-function addPageNavigation ($pages, $offset, $showForm, $colspan, $return=false) {
+function addPageNavigation ($numPages, $offset, $showForm, $colspan, $return=false) {
        // @TODO These two constants are no longer used, maybe we reactivate this code?
        //if ($showForm === true) {
        //      // Load form for changing number of lines
@@ -155,7 +155,7 @@ function addPageNavigation ($pages, $offset, $showForm, $colspan, $return=false)
        //}
 
        $OUT = '';
-       for ($page = 1; $page <= $pages; $page++) {
+       for ($page = 1; $page <= $numPages; $page++) {
                if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) {
                        $OUT .= '<strong>-';
                } else {
@@ -181,7 +181,7 @@ function addPageNavigation ($pages, $offset, $showForm, $colspan, $return=false)
                        $OUT .= '</a>';
                }
 
-               if ($page < $pages) $OUT .= '|';
+               if ($page < $numPages) $OUT .= '|';
        } // END - for
 
        // Remember the list