diff --git a/ChangeLog b/ChangeLog index cb4f92393..e107c1f67 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,9 +7,12 @@ $Source$ 2005-11-24 Sebastian Mendel * libraries/grab_globals.lib.php: allow scripts to bypass importing vars - * libraries/common.lib.php, libraries/export/sql.php: define variables only - where needed, and use NULL to define them, as some places test only for - isset and not for content + * libraries/common.lib.php, libraries/export/sql.php, + libraries/display_tbl.lib.php, libraries/mult_submits.inc.php, sql.php, + tbl_replace.php, tbl_row_action.php: + define variables only where needed, and use NULL to define them + if some places test only for isset and not for content + 2005-11-25 Marc Delisle * main.php: move server choice into MySQL container diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 1d7715fbd..9425af768 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -6,6 +6,13 @@ * Set of functions used to display the records returned by a sql query */ +/** + * Avoids undefined variables + */ +if (!isset($pos)) { + $pos = 0; +} + /** * Defines the display mode to use for the results of a sql query * diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 780ded940..93ac3d58c 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -252,7 +252,7 @@ if ( !empty($submit_mult) && !empty($what)) { echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; - echo '' . "\n"; + echo '' . "\n"; echo '' . "\n"; } ?> diff --git a/sql.php b/sql.php index 9f5633ed3..3d7b7e0c8 100644 --- a/sql.php +++ b/sql.php @@ -85,6 +85,12 @@ if (isset($find_real_end) && $find_real_end) { $unlim_num_rows = PMA_countRecords($db, $table, TRUE, TRUE); $pos = @((ceil($unlim_num_rows / $session_max_rows) - 1) * $session_max_rows); } +/** + * Avoids undefined variables + */ +elseif (!isset($pos)) { + $pos = 0; +} /** * Bookmark add diff --git a/tbl_replace.php b/tbl_replace.php index da6217d9d..3cd8e22a4 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -22,6 +22,9 @@ if (isset($sql_query)) { if (!isset($dontlimitchars)) { $dontlimitchars = 0; } +if (!isset($pos)) { + $pos = 0; +} $is_gotofile = FALSE; if (isset($after_insert) && $after_insert == 'new_insert') { $goto = 'tbl_change.php?' diff --git a/tbl_row_action.php b/tbl_row_action.php index eed0d23bf..206f28492 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -4,6 +4,13 @@ require_once('./libraries/common.lib.php'); require_once('./libraries/mysql_charsets.lib.php'); +/** + * Avoids undefined variables + */ +if (!isset($pos)) { + $pos = 0; +} + /** * No rows were selected => show again the query and tell that user. */