diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-02-06 00:10:42 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-02-06 00:10:42 +0000 |
| commit | f98775dd2cac9f4fb3a3462b8787d0adf6005ca0 (patch) | |
| tree | 3ae6882333f8d3bea056d710adf608117f8af67c /stats.php | |
| parent | 0987e213ec9400dffb7cf21d9dd0387a90f0abc9 (diff) | |
| download | search-f98775dd2cac9f4fb3a3462b8787d0adf6005ca0.tar.gz search-f98775dd2cac9f4fb3a3462b8787d0adf6005ca0.tar.bz2 search-f98775dd2cac9f4fb3a3462b8787d0adf6005ca0.zip | |
more preference standardisation
Diffstat (limited to 'stats.php')
| -rw-r--r-- | stats.php | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_search/stats.php,v 1.4 2006/01/27 21:56:30 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_search/stats.php,v 1.5 2006/02/06 00:10:42 squareing Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: stats.php,v 1.4 2006/01/27 21:56:30 squareing Exp $ + * $Id: stats.php,v 1.5 2006/02/06 00:10:42 squareing Exp $ * @author Luis Argerich (lrargerich@yahoo.com) * @package search * @subpackage functions @@ -41,7 +41,7 @@ if (!isset($_REQUEST["offset"])) { } if (isset($_REQUEST['page'])) { $page = &$_REQUEST['page']; - $offset = ($page - 1) * $maxRecords; + $offset = ($page - 1) * $max_records; } $gBitSmarty->assign_by_ref('offset', $offset); @@ -54,21 +54,21 @@ if (isset($_REQUEST["find"])) { $gBitSmarty->assign('find', $find); $gBitSmarty->assign_by_ref('sort_mode', $sort_mode); -$channels = $searchstatslib->list_search_stats($offset, $maxRecords, $sort_mode, $find); +$channels = $searchstatslib->list_search_stats($offset, $max_records, $sort_mode, $find); -$cant_pages = ceil($channels["cant"] / $maxRecords); +$cant_pages = ceil($channels["cant"] / $max_records); $gBitSmarty->assign_by_ref('cant_pages', $cant_pages); -$gBitSmarty->assign('actual_page', 1 + ($offset / $maxRecords)); +$gBitSmarty->assign('actual_page', 1 + ($offset / $max_records)); -if ($channels["cant"] > ($offset + $maxRecords)) { - $gBitSmarty->assign('next_offset', $offset + $maxRecords); +if ($channels["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); } |
