bug 990959
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2004-07-15 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* tbl_change.php: bug 990959, undefined index for DATETIME
|
||||||
|
field (problem in UTF-8 only!)
|
||||||
|
|
||||||
2004-07-14 Marc Delisle <lem9@users.sourceforge.net>
|
2004-07-14 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* index.php, libraries/common.lib.php: bug 989581 and left panel
|
* index.php, libraries/common.lib.php: bug 989581 and left panel
|
||||||
display problems when switching themes
|
display problems when switching themes
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
// vim: expandtab sw=4 ts=4 sts=4:
|
// vim: expandtab sw=4 ts=4 sts=4:
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the variables sent or posted to this script and displays the header
|
* Get the variables sent or posted to this script and displays the header
|
||||||
@@ -293,6 +293,22 @@ foreach ($loop_array AS $vrowcount => $vrow) {
|
|||||||
// lem9: but do not put here the current datetime if there is a default
|
// lem9: but do not put here the current datetime if there is a default
|
||||||
// value (the real default value will be set in the
|
// value (the real default value will be set in the
|
||||||
// Default value logic below)
|
// Default value logic below)
|
||||||
|
|
||||||
|
// Note: (tested in MySQL 4.0.16): when lang is some UTF-8,
|
||||||
|
// $row_table_def['Default'] is not set if it contains NULL:
|
||||||
|
// Array ( [Field] => d [Type] => datetime [Null] => YES [Key] => [Extra] => [True_Type] => datetime )
|
||||||
|
// but, look what we get if we switch to iso: (Default is NULL)
|
||||||
|
// Array ( [Field] => d [Type] => datetime [Null] => YES [Key] => [Default] => [Extra] => [True_Type] => datetime )
|
||||||
|
// so I force a NULL into it (I don't think it's possible
|
||||||
|
// to have an empty default value for DATETIME)
|
||||||
|
// then, the "if" after this one will work
|
||||||
|
if ($row_table_def['Type'] == 'datetime'
|
||||||
|
&& !isset($row_table_def['Default'])
|
||||||
|
&& isset($row_table_def['Null'])
|
||||||
|
&& $row_table_def['Null'] == 'YES') {
|
||||||
|
$row_table_def['Default'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ($row_table_def['Type'] == 'datetime'
|
if ($row_table_def['Type'] == 'datetime'
|
||||||
&& (!isset($row_table_def['Default']))
|
&& (!isset($row_table_def['Default']))
|
||||||
&& (!is_null($row_table_def['Default']))) {
|
&& (!is_null($row_table_def['Default']))) {
|
||||||
@@ -387,7 +403,6 @@ foreach ($loop_array AS $vrowcount => $vrow) {
|
|||||||
$row_table_def['Default'] = '';
|
$row_table_def['Default'] = '';
|
||||||
$real_null_value = TRUE;
|
$real_null_value = TRUE;
|
||||||
$data = '';
|
$data = '';
|
||||||
//$data = 'NULL';
|
|
||||||
} else {
|
} else {
|
||||||
$data = $row_table_def['Default'];
|
$data = $row_table_def['Default'];
|
||||||
}
|
}
|
||||||
@@ -485,7 +500,6 @@ foreach ($loop_array AS $vrowcount => $vrow) {
|
|||||||
&& $row_table_def['Null'] == 'YES') {
|
&& $row_table_def['Null'] == 'YES') {
|
||||||
echo ' <input type="checkbox" tabindex="' . ($tabindex + $tab2) . '"'
|
echo ' <input type="checkbox" tabindex="' . ($tabindex + $tab2) . '"'
|
||||||
. ' name="fields_null' . $vkey . '[' . urlencode($field) . ']"';
|
. ' name="fields_null' . $vkey . '[' . urlencode($field) . ']"';
|
||||||
//if ($data == 'NULL' && !$first_timestamp) {
|
|
||||||
if ($real_null_value && !$first_timestamp) {
|
if ($real_null_value && !$first_timestamp) {
|
||||||
echo ' checked="checked"';
|
echo ' checked="checked"';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user