This commit is contained in:
Michal Čihař
2002-09-19 09:04:46 +00:00
parent 2f66c315e4
commit d316c0a0f8
5 changed files with 66 additions and 3 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$
$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>
* db_details_qbe.php3: complete rewrite of the code
that creates the JOINS hoping that this will

View File

@@ -1112,6 +1112,24 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<br /><br />
</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>
<b>$cfg['ZipDump'] </b>boolean<br />
<b>$cfg['GZipDump'] </b>boolean<br />
@@ -1296,11 +1314,15 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
<dt>
<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>
<dd>
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 />
</dd>

View File

@@ -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)

View File

@@ -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)) {

View File

@@ -601,7 +601,18 @@ for ($i = 0; $i < $fields_cnt; $i++) {
?>
<td bgcolor="<?php echo $bgcolor; ?>">
<?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>
<?php
}