diff --git a/ChangeLog b/ChangeLog index d60f90464..c2c1ff7ed 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-12-22 Marc Delisle + * tbl_change.php, libraries/common.lib.php: bug #1381856, + Cannot edit a table having 40 columns + 2005-12-21 Marc Delisle * lang/danish: Updated, thanks to AlleyKat - dk_alleykat * lang/hungarian update, thanks to Mihály Mészáros diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 76ce1ed17..f07a19724 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2575,6 +2575,7 @@ if (isset($_POST['usesubform'])) { $subform_id = key($_POST['usesubform']); $subform = $_POST['subform'][$subform_id]; $_POST = $subform; + $_REQUEST = $subform; if (isset($_POST['redirect']) && $_POST['redirect'] != basename($_SERVER['PHP_SELF'])) { $__redirect = $_POST['redirect']; diff --git a/tbl_change.php b/tbl_change.php index 942dde80f..245bc66c8 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -3,10 +3,38 @@ // vim: expandtab sw=4 ts=4 sts=4: /** - * Get the variables sent or posted to this script and displays the header + * Gets the variables sent or posted to this script and displays the header */ require_once('./libraries/common.lib.php'); +/** + * Sets global variables. + * Here it's better to use a if, instead of the '?' operator + * to avoid setting a variable to '' when it's not present in $_REQUEST + */ +if (isset($_REQUEST['pos'])) { + $pos = $_REQUEST['pos']; +} +if (isset($_REQUEST['session_max_rows'])) { + $session_max_rows = $_REQUEST['session_max_rows']; +} +if (isset($_REQUEST['disp_direction'])) { + $disp_direction = $_REQUEST['disp_direction']; +} +if (isset($_REQUEST['repeat_cells'])) { + $repeat_cells = $_REQUEST['repeat_cells']; +} +if (isset($_REQUEST['dontlimitchars'])) { + $dontlimitchars = $_REQUEST['dontlimitchars']; +} +if (isset($_REQUEST['primary_key'])) { + $primary_key = $_REQUEST['primary_key']; +} +if (isset($_REQUEST['sql_query'])) { + $sql_query = $_REQUEST['sql_query']; +} + + $js_to_run = 'tbl_change.js'; require_once('./libraries/header.inc.php'); require_once('./libraries/relation.lib.php'); // foreign keys