diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index e145543397..a8b6e99cf5 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -75,7 +75,7 @@ else { if ($prep_statement) { $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - $total_destinations = $row['num_rows']; + $num_rows = $row['num_rows']; } else { $num_rows = 0; @@ -89,7 +89,7 @@ else { } $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($total_destinations, $param, $rows_per_page); + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); $offset = $rows_per_page * $page; //get the list @@ -118,13 +118,12 @@ else { $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $destinations = $prep_statement->fetchAll(); - $destination_count = count($destination); unset ($prep_statement, $sql); //show the content echo "
| ".$text['header-destinations']." (".$total_destinations.") | \n"; + echo "".$text['header-destinations']." (".$num_rows.") | \n"; echo "||||
| \n"; } if (permission_exists('destination_add')) { - if ($_SESSION['limit']['destinations']['numeric'] == '' || ($_SESSION['limit']['destinations']['numeric'] != '' && $total_destinations < $_SESSION['limit']['destinations']['numeric'])) { + if ($_SESSION['limit']['destinations']['numeric'] == '' || ($_SESSION['limit']['destinations']['numeric'] != '' && $num_rows < $_SESSION['limit']['destinations']['numeric'])) { echo "".$v_link_label_add.""; } } | |||||