bug 443760
This commit is contained in:
@@ -9,6 +9,9 @@ $Source$
|
|||||||
* merge Loic's version to cvs
|
* merge Loic's version to cvs
|
||||||
* spanish.inc.php3 updates, thanks to
|
* spanish.inc.php3 updates, thanks to
|
||||||
gginard@navegalia.com
|
gginard@navegalia.com
|
||||||
|
* tbl_change.php3: bug 443760: binary attribute does not mean that
|
||||||
|
the contents is binary, so they should be editable
|
||||||
|
* new $cfgProtectBlob, protecting editing of blobs is optional
|
||||||
|
|
||||||
2001-07-28 Marc Delisle <lem9@users.sourceforge.net>
|
2001-07-28 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* lib.inc.php3: establish constraints for the code, to get
|
* lib.inc.php3: establish constraints for the code, to get
|
||||||
|
@@ -479,6 +479,14 @@
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt><b>$cfgProtectBlob </b>boolean</dt>
|
||||||
|
<dd>
|
||||||
|
Defines whether <tt>BLOB</tt> fields are protected from edition
|
||||||
|
when browsing a table's content or not.
|
||||||
|
<br /><br />
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt><b>$cfgShowSQL </b>boolean</dt>
|
||||||
<dt><b>$cfgShowSQL </b>boolean</dt>
|
<dt><b>$cfgShowSQL </b>boolean</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Defines whether sql-queries generated by phpMyAdmin should be displayed
|
Defines whether sql-queries generated by phpMyAdmin should be displayed
|
||||||
|
@@ -79,6 +79,7 @@ unset($cfgServers[0]);
|
|||||||
$cfgConfirm = TRUE;
|
$cfgConfirm = TRUE;
|
||||||
$cfgPersistentConnections = FALSE;
|
$cfgPersistentConnections = FALSE;
|
||||||
$cfgShowBlob = FALSE;
|
$cfgShowBlob = FALSE;
|
||||||
|
$cfgProtectBlob = FALSE;
|
||||||
$cfgShowSQL = TRUE;
|
$cfgShowSQL = TRUE;
|
||||||
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
|
$cfgSkipLockedTables = FALSE; // mark used tables, make possible to show
|
||||||
// locked tables (since MySQL 3.23.30)
|
// locked tables (since MySQL 3.23.30)
|
||||||
|
@@ -37,6 +37,9 @@ if (!defined('__LIB_INC__')){
|
|||||||
if (!isset($pos)) {
|
if (!isset($pos)) {
|
||||||
$pos=0;
|
$pos=0;
|
||||||
}
|
}
|
||||||
|
if (!isset($cfgProtectBlob)) {
|
||||||
|
$cfgProtectBlob=FALSE;
|
||||||
|
}
|
||||||
/* ---------------------- Advanced authentification -------------------- */
|
/* ---------------------- Advanced authentification -------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -116,8 +116,14 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
|
|||||||
|
|
||||||
// Change by Bernard M. Piller <bernard@bmpsystems.com>
|
// Change by Bernard M. Piller <bernard@bmpsystems.com>
|
||||||
// We don't want binary data to be destroyed
|
// We don't want binary data to be destroyed
|
||||||
if ((strstr($row_table_def['Type'], 'blob') || strstr($row_table_def['Type'], 'binary'))
|
// Note: from the MySQL manual: "BINARY doesn't affect how the column
|
||||||
&& !empty($data)) {
|
// is stored or retrieved" so it does not mean that the contents
|
||||||
|
// is binary
|
||||||
|
|
||||||
|
//if ((strstr($row_table_def['Type'], 'blob') || strstr($row_table_def['Type'], 'binary'))
|
||||||
|
if (strstr($row_table_def['Type'], 'blob')
|
||||||
|
&& !empty($data)
|
||||||
|
&& $cfgProtectBlob==TRUE) {
|
||||||
echo ' <td>' . $strBinary . '</td>' . "\n";
|
echo ' <td>' . $strBinary . '</td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
@@ -258,15 +264,25 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
|
|||||||
}
|
}
|
||||||
// Change by Bernard M. Piller <bernard@bmpsystems.com>
|
// Change by Bernard M. Piller <bernard@bmpsystems.com>
|
||||||
// We don't want binary data destroyed
|
// We don't want binary data destroyed
|
||||||
else if ((strstr($row_table_def['Type'], 'blob') || strstr($row_table_def['Type'], 'binary'))
|
else if (strstr($row_table_def['Type'], 'blob')
|
||||||
&& !empty($data)) {
|
&& !empty($data)) {
|
||||||
echo "\n";
|
if ($cfgProtectBlob==TRUE) {
|
||||||
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $strBinaryDoNotEdit . "\n"; ?>
|
<?php echo $strBinaryDoNotEdit . "\n"; ?>
|
||||||
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" />
|
<input type="hidden" name="fields[<?php echo urlencode($field); ?>]" value="<?php echo $special_chars; ?>" />
|
||||||
</td>
|
</td>
|
||||||
|
<?php }
|
||||||
|
else {
|
||||||
|
?>
|
||||||
|
<td>
|
||||||
|
<textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>">
|
||||||
|
<?php if (!empty($special_chars)) echo $special_chars . "\n"; ?>
|
||||||
|
</textarea>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$fieldsize = (($len > 40) ? 40 : $len);
|
$fieldsize = (($len > 40) ? 40 : $len);
|
||||||
|
Reference in New Issue
Block a user