The branch, master has been updated via c3db2ade118cd21b38771335bda2e2b258432bb7 (commit) from 386581bcb68c2754f99f42ee398a897351c6a12a (commit)
- Log ----------------------------------------------------------------- commit c3db2ade118cd21b38771335bda2e2b258432bb7 Author: Marc Delisle marc@infomarc.info Date: Sun Dec 19 05:49:38 2010 -0500
Makes sense to use MaxRows instead of a hard-coded value
-----------------------------------------------------------------------
Summary of changes: browse_foreigners.php | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/browse_foreigners.php b/browse_foreigners.php index fd9c882..4b07400 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -21,7 +21,6 @@ require_once './libraries/header_http.inc.php'; /** * Displays the frame */ -$per_page = 200; require_once './libraries/transformations.lib.php'; // Transformations $cfgRelation = PMA_getRelationsParam(); $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); @@ -32,7 +31,7 @@ if (!isset($pos)) { $pos = 0; }
-$foreign_limit = 'LIMIT ' . $pos . ', ' . $per_page . ' '; +$foreign_limit = 'LIMIT ' . $pos . ', ' . $GLOBALS['cfg']['MaxRows'] . ' '; if (isset($foreign_navig) && $foreign_navig == __('Show all')) { unset($foreign_limit); } @@ -53,15 +52,15 @@ $showall = '';
if (is_array($foreignData['disp_row'])) {
- if ($cfg['ShowAll'] && ($foreignData['the_total'] > $per_page)) { + if ($cfg['ShowAll'] && ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows'])) { $showall = '<input type="submit" name="foreign_navig" value="' . __('Show all') . '" />'; }
- $session_max_rows = $per_page; + $session_max_rows = $GLOBALS['cfg']['MaxRows']; $pageNow = @floor($pos / $session_max_rows) + 1; $nbTotalPage = @ceil($foreignData['the_total'] / $session_max_rows);
- if ($foreignData['the_total'] > $per_page) { + if ($foreignData['the_total'] > $GLOBALS['cfg']['MaxRows']) { $gotopage = PMA_pageselector( 'browse_foreigners.php?field=' . urlencode($field) . '&' . PMA_generate_common_url($db, $table)
hooks/post-receive