From f98775dd2cac9f4fb3a3462b8787d0adf6005ca0 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Mon, 6 Feb 2006 00:10:42 +0000 Subject: more preference standardisation --- index.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index d310b96..7da4e24 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ assign_by_ref('offset', $offset); // Build the query using words if ((!isset($_REQUEST["words"])) || (empty($_REQUEST["words"]))) { - $results = $searchlib->find($where,' ', $offset, $maxRecords, $gBitSystem->isFeatureActive( 'feature_search_fulltext' )); + $results = $searchlib->find($where,' ', $offset, $max_records, $gBitSystem->isFeatureActive( 'feature_search_fulltext' )); $gBitSmarty->assign('words', ''); } else { $words = strip_tags($_REQUEST["words"]); - $results = $searchlib->find($where,$words, $offset, $maxRecords, $gBitSystem->isFeatureActive( 'feature_search_fulltext' )); + $results = $searchlib->find($where,$words, $offset, $max_records, $gBitSystem->isFeatureActive( 'feature_search_fulltext' )); $gBitSmarty->assign('words', $words); } @@ -132,20 +132,20 @@ if ( $results['cant'] > 0 ) { } } -$cant_pages = ceil($results["cant"] / $maxRecords); +$cant_pages = ceil($results["cant"] / $max_records); $gBitSmarty->assign('cant_results', $results["cant"]); $gBitSmarty->assign_by_ref('cant_pages', $cant_pages); -$gBitSmarty->assign('actual_page', 1 + ($offset / $maxRecords)); +$gBitSmarty->assign('actual_page', 1 + ($offset / $max_records)); -if ($results["cant"] > ($offset + $maxRecords)) { - $gBitSmarty->assign('next_offset', $offset + $maxRecords); +if ($results["cant"] > ($offset + $max_records)) { + $gBitSmarty->assign('next_offset', $offset + $max_records); } else { $gBitSmarty->assign('next_offset', -1); } // If offset is > 0 then prev_offset if ($offset > 0) { - $gBitSmarty->assign('prev_offset', $offset - $maxRecords); + $gBitSmarty->assign('prev_offset', $offset - $max_records); } else { $gBitSmarty->assign('prev_offset', -1); } -- cgit v1.3