fix for #581494
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-09-19 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
|
* 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 <mikebeck@users.sourceforge.net>
|
2002-09-18 Mike Beck <mikebeck@users.sourceforge.net>
|
||||||
* db_details_qbe.php3: complete rewrite of the code
|
* db_details_qbe.php3: complete rewrite of the code
|
||||||
that creates the JOINS hoping that this will
|
that creates the JOINS hoping that this will
|
||||||
|
@@ -1112,6 +1112,24 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt><b>$cfg['CharEditing'] </b>string</dt>
|
||||||
|
<dd>
|
||||||
|
Defines which type of editing controls should be used for CHAR and
|
||||||
|
VARCHAR fields. Possible values are:
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
input - this allows to limit size of text to size of field in
|
||||||
|
MySQL, but has problems with newlines in fields
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
textarea - no problems with newlines in fields, but also no
|
||||||
|
length limitations
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
Default is old behavior so input.
|
||||||
|
<br /><br />
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt>
|
<dt>
|
||||||
<b>$cfg['ZipDump'] </b>boolean<br />
|
<b>$cfg['ZipDump'] </b>boolean<br />
|
||||||
<b>$cfg['GZipDump'] </b>boolean<br />
|
<b>$cfg['GZipDump'] </b>boolean<br />
|
||||||
@@ -1296,11 +1314,15 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
|||||||
|
|
||||||
<dt>
|
<dt>
|
||||||
<b>$cfg['TextareaCols'] </b>integer<br />
|
<b>$cfg['TextareaCols'] </b>integer<br />
|
||||||
<b>$cfg['TextareaRows'] </b>integer
|
<b>$cfg['TextareaRows'] </b>integer<br />
|
||||||
|
<b>$cfg['CharTextareaCols'] </b>integer<br />
|
||||||
|
<b>$cfg['CharTextareaRows'] </b>integer
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Number of columns and rows for the textareas.<br />
|
Number of columns and rows for the textareas.<br />
|
||||||
This value will be emphasized (*2) for sql query textareas.
|
This value will be emphasized (*2) for sql query textareas.<br />
|
||||||
|
The Char* values are used for CHAR and VARCHAR editing (if configured
|
||||||
|
via $cfg['CharEditing']).
|
||||||
<br /><br />
|
<br /><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
@@ -205,6 +205,10 @@ $cfg['ProtectBinary'] = 'blob'; // disallow editing of binary fields
|
|||||||
// 'blob' allow editing except for BLOB fields
|
// 'blob' allow editing except for BLOB fields
|
||||||
// 'all' disallow editing
|
// 'all' disallow editing
|
||||||
$cfg['ShowFunctionFields'] = TRUE; // Display the function fields in edit/insert mode
|
$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...
|
// For the export features...
|
||||||
$cfg['ZipDump'] = TRUE; // Allow the use of zip/gzip/bzip
|
$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)
|
// query textareas)
|
||||||
$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode
|
$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode
|
||||||
$cfg['TextareaAutoSelect'] = TRUE; // autoselect when clicking in the textarea of the querybox
|
$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['LimitChars'] = 50; // max field data length in browse mode
|
||||||
$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse
|
$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse
|
||||||
// (or at the top with vertical browse)
|
// (or at the top with vertical browse)
|
||||||
|
@@ -543,6 +543,24 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){
|
|||||||
if (!isset($cfg['TextareaAutoSelect'])) {
|
if (!isset($cfg['TextareaAutoSelect'])) {
|
||||||
$cfg['TextareaAutoSelect'] = TRUE;
|
$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($cfg['LimitChars'])) {
|
||||||
if (isset($cfgLimitChars)) {
|
if (isset($cfgLimitChars)) {
|
||||||
|
@@ -601,7 +601,18 @@ for ($i = 0; $i < $fields_cnt; $i++) {
|
|||||||
?>
|
?>
|
||||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||||
<?php echo $backup_field . "\n"; ?>
|
<?php echo $backup_field . "\n"; ?>
|
||||||
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo $i+1; ?>" />
|
<?php
|
||||||
|
if ($is_char && isset($cfg['CharEditing']) && ($cfg['CharEditing'] == 'textarea')) {
|
||||||
|
?>
|
||||||
|
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfg['CharTextareaRows']; ?>" cols="<?php echo $cfg['CharTextareaCols']; ?>" wrap="virtual" dir="<?php echo $text_dir; ?>"
|
||||||
|
<?php echo $chg_evt_handler; ?>="return unNullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo $i+1; ?>" ><?php echo $special_chars; ?></textarea>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<input type="text" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" size="<?php echo $fieldsize; ?>" maxlength="<?php echo $maxlength; ?>" class="textfield" <?php echo $chg_evt_handler; ?>="return unnullify('<?php echo urlencode($field); ?>')" tabindex="<?php echo $i+1; ?>" />
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user