diff --git a/ChangeLog b/ChangeLog index 538269b40..f186c6838 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,12 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-09-19 Michal Cihar + * Documentation.html, config.inc.php3, tbl_change.php3, + libraries/config_import.lib.php3: fix for #581494 - problems with \n in + CHAR/VARCHAR, added new configs $cfg['CharEditing'] and + $cfg['CharTextarea{Cols,Rows}'] + 2002-09-18 Mike Beck * db_details_qbe.php3: complete rewrite of the code that creates the JOINS hoping that this will diff --git a/Documentation.html b/Documentation.html index 8a8822206..a6cc2bea1 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1112,6 +1112,24 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

+
$cfg['CharEditing'] string
+
+ Defines which type of editing controls should be used for CHAR and + VARCHAR fields. Possible values are: +
    +
  • + input - this allows to limit size of text to size of field in + MySQL, but has problems with newlines in fields +
  • +
  • + textarea - no problems with newlines in fields, but also no + length limitations +
  • +
+ Default is old behavior so input. +

+
+
$cfg['ZipDump'] boolean
$cfg['GZipDump'] boolean
@@ -1296,11 +1314,15 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
$cfg['TextareaCols'] integer
- $cfg['TextareaRows'] integer + $cfg['TextareaRows'] integer
+ $cfg['CharTextareaCols'] integer
+ $cfg['CharTextareaRows'] integer
Number of columns and rows for the textareas.
- This value will be emphasized (*2) for sql query textareas. + This value will be emphasized (*2) for sql query textareas.
+ The Char* values are used for CHAR and VARCHAR editing (if configured + via $cfg['CharEditing']).

diff --git a/config.inc.php3 b/config.inc.php3 index 4076e89e1..1b136c2c9 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -205,6 +205,10 @@ $cfg['ProtectBinary'] = 'blob'; // disallow editing of binary fields // 'blob' allow editing except for BLOB fields // 'all' disallow editing $cfg['ShowFunctionFields'] = TRUE; // Display the function fields in edit/insert mode +$cfg['CharEditing'] = 'input'; + // Which editor should be used for CHAR/VARCHAR fields: + // input - allows limiting of input length + // textarea - allows newlines in fields // For the export features... $cfg['ZipDump'] = TRUE; // Allow the use of zip/gzip/bzip @@ -338,6 +342,8 @@ $cfg['TextareaCols'] = 40; // textarea size (columns) in edit m // query textareas) $cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode $cfg['TextareaAutoSelect'] = TRUE; // autoselect when clicking in the textarea of the querybox +$cfg['CharTextareaCols'] = 40; // textarea size (columns) for CHAR/VARCHAR +$cfg['CharTextareaRows'] = 2; // textarea size (rows) for CHAR/VARCHAR $cfg['LimitChars'] = 50; // max field data length in browse mode $cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse // (or at the top with vertical browse) diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index 2587c6eb1..373d26fe2 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -543,6 +543,24 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){ if (!isset($cfg['TextareaAutoSelect'])) { $cfg['TextareaAutoSelect'] = TRUE; } + + if (!isset($cfg['CharTextareaCols'])) { + if (isset($cfgCharTextareaCols)) { + $cfg['CharTextareaCols'] = $cfgCharTextareaCols; + unset($cfgCharTextareaCols); + } else { + $cfg['CharTextareaCols'] = 40; + } + } + + if (!isset($cfg['CharTextareaRows'])) { + if (isset($cfgCharTextareaRows)) { + $cfg['CharTextareaRows'] = $cfgCharTextareaRows; + unset($cfgCharTextareaRows); + } else { + $cfg['CharTextareaRows'] = 2; + } + } if (!isset($cfg['LimitChars'])) { if (isset($cfgLimitChars)) { diff --git a/tbl_change.php3 b/tbl_change.php3 index b6f6eb0b8..9d637116f 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -601,7 +601,18 @@ for ($i = 0; $i < $fields_cnt; $i++) { ?> - ="return unNullify('')" tabindex="" /> + + + + ="return unnullify('')" tabindex="" /> +