From a1f45b7b784de54ee0fb3c3d5db25fd7c7789554 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 23 Sep 2002 16:02:38 +0000 Subject: [PATCH] for Loic --- ChangeLog | 5 +++-- libraries/display_tbl.lib.php3 | 28 ++++++++++++++-------------- tbl_change.php3 | 14 +++++++------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f62f87fe1..ff67a0e9e5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,8 +5,8 @@ phpMyAdmin - Changelog $Id$ $Source$ -2002-09-22 Loïc Chapeaux - * libraries/sqlparser.lib.php3: coding standards +2002-09-23 Loïc Chapeaux + * libraries/display_tbl.lib.php3, tbl_change.php3: coding standards 2002-09-23 Michal Cihar * libraries/sqlparser.lib.php3: fix for #613102 (ALTER TABLE:missing @@ -14,6 +14,7 @@ $Source$ 2002-09-22 Loïc Chapeaux * tbl_relation.php3: fix fox #611519 (slash in comment) + * libraries/sqlparser.lib.php3: coding standards 2002-09-21 Alexander M. Turek * lang/german-*.inc.php3: Updates. diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 81558de636..19409bdf87 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -718,26 +718,26 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ function PMA_linkOrButton($url, $message, $js_conf) { if (strlen($url) <= 2047) { - $onclick_url = (empty($js_conf) ? '' : ' onclick="return confirmLink(this, \'' . $js_conf . '\')"'); - $linkOrButton = ' ' . "\n" - . ' ' . $message . '' . "\n"; + $onclick_url = (empty($js_conf) ? '' : ' onclick="return confirmLink(this, \'' . $js_conf . '\')"'); + $link_or_button = ' ' . "\n" + . ' ' . $message . '' . "\n"; } else { - $edit_url_parts = parse_url($url); - $query_parts = explode('&', $edit_url_parts['query']); - $linkOrButton = '
' . "\n"; + $edit_url_parts = parse_url($url); + $query_parts = explode('&', $edit_url_parts['query']); + $link_or_button = ' ' . "\n"; reset ($query_parts); - while (list(, $query_pair) = each ($query_parts)) { + while (list(, $query_pair) = each($query_parts)) { list($eachvar, $eachval) = explode('=', $query_pair); - $linkOrButton .= ' ' . "\n"; + $link_or_button .= ' ' . "\n"; } // end while - $linkOrButton .= ' ' . "\n" . '
' . "\n"; + $link_or_button .= ' ' . "\n" . '' . "\n"; } // end if... else... - return $linkOrButton; + return $link_or_button; } // end of the 'PMA_linkOrButton()' function @@ -1188,7 +1188,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){ if (isset($edit_url)) { $vertical_display['edit'][$row_no] .= ' ' . "\n" - . PMA_linkOrButton($edit_url, $edit_str, '') + . PMA_linkOrButton($edit_url, $edit_str, '') . ' ' . "\n"; } diff --git a/tbl_change.php3 b/tbl_change.php3 index 5086471fd8..bf15e92fef 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -223,7 +223,7 @@ for ($i = 0; $i < $fields_cnt; $i++) { // lem9: but do not put here the current datetime if there is a default // value (the real default value will be set in the // Default value logic below) - if (($row_table_def['Type'] == 'datetime') + if ($row_table_def['Type'] == 'datetime' && (!isset($row_table_def['Default']))) { // INSERT case if ($insert_mode) { @@ -429,16 +429,16 @@ for ($i = 0; $i < $fields_cnt; $i++) { if (isset($disp) && $disp) { ?> - - - +