rfe #1516803 [edit] Allow to set BLOB to/from NULL with ProtectBinary.
This commit is contained in:
@@ -30,6 +30,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
+ [interface] Allow to create new table from navigation frame (in light mode).
|
+ [interface] Allow to create new table from navigation frame (in light mode).
|
||||||
+ rfe #1025696 [browse] Add direct download of binary fields.
|
+ rfe #1025696 [browse] Add direct download of binary fields.
|
||||||
- [browse] Properly display NULL value for BLOB.
|
- [browse] Properly display NULL value for BLOB.
|
||||||
|
- rfe #1516803 [edit] Allow to set BLOB to/from NULL with ProtectBinary.
|
||||||
|
|
||||||
3.3.0.0 (not yet released)
|
3.3.0.0 (not yet released)
|
||||||
+ rfe #2308632 [edit] Use hex for (var)binary fields,
|
+ rfe #2308632 [edit] Use hex for (var)binary fields,
|
||||||
|
@@ -121,7 +121,7 @@ if (false !== $possibly_uploaded_val) {
|
|||||||
// (if there is a value, we ignore the Null checkbox: this could
|
// (if there is a value, we ignore the Null checkbox: this could
|
||||||
// be possible if Javascript is disabled in the browser)
|
// be possible if Javascript is disabled in the browser)
|
||||||
if (isset($me_fields_null[$key])
|
if (isset($me_fields_null[$key])
|
||||||
&& $val == "''") {
|
&& ($val == "''" || $val == '')) {
|
||||||
$val = 'NULL';
|
$val = 'NULL';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -597,41 +597,32 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
}
|
}
|
||||||
echo ' />' . "\n";
|
echo ' />' . "\n";
|
||||||
|
|
||||||
if (!(($cfg['ProtectBinary'] && $field['is_blob']) || ($cfg['ProtectBinary'] == 'all' && $field['is_binary']))) {
|
echo ' <input type="checkbox" tabindex="' . ($tabindex + $tabindex_for_null) . '"'
|
||||||
|
. ' name="fields_null' . $field_name_appendix . '"';
|
||||||
echo ' <input type="checkbox" tabindex="' . ($tabindex + $tabindex_for_null) . '"'
|
if ($real_null_value && !$field['first_timestamp']) {
|
||||||
. ' name="fields_null' . $field_name_appendix . '"';
|
echo ' checked="checked"';
|
||||||
if ($real_null_value && !$field['first_timestamp']) {
|
|
||||||
echo ' checked="checked"';
|
|
||||||
}
|
|
||||||
echo ' id="field_' . ($idindex) . '_2"';
|
|
||||||
$onclick = ' onclick="if (this.checked) {nullify(';
|
|
||||||
if (strstr($field['True_Type'], 'enum')) {
|
|
||||||
if (strlen($field['Type']) > 20) {
|
|
||||||
$onclick .= '1, ';
|
|
||||||
} else {
|
|
||||||
$onclick .= '2, ';
|
|
||||||
}
|
|
||||||
} elseif (strstr($field['True_Type'], 'set')) {
|
|
||||||
$onclick .= '3, ';
|
|
||||||
} elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == false) {
|
|
||||||
// foreign key in a drop-down
|
|
||||||
$onclick .= '4, ';
|
|
||||||
} elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == true) {
|
|
||||||
// foreign key with a browsing icon
|
|
||||||
$onclick .= '6, ';
|
|
||||||
} else {
|
|
||||||
$onclick .= '5, ';
|
|
||||||
}
|
|
||||||
$onclick .= '\'' . PMA_escapeJsString($field['Field_html']) . '\', \'' . $field['Field_md5'] . '\', \'' . PMA_escapeJsString($vkey) . '\'); this.checked = true}; return true" />' . "\n";
|
|
||||||
echo $onclick;
|
|
||||||
} else {
|
|
||||||
echo ' <input type="hidden" name="fields_null' . $field_name_appendix . '"';
|
|
||||||
if ($real_null_value && !$field['first_timestamp']) {
|
|
||||||
echo ' value="on"';
|
|
||||||
}
|
|
||||||
echo ' />' . "\n";
|
|
||||||
}
|
}
|
||||||
|
echo ' id="field_' . ($idindex) . '_2"';
|
||||||
|
$onclick = ' onclick="if (this.checked) {nullify(';
|
||||||
|
if (strstr($field['True_Type'], 'enum')) {
|
||||||
|
if (strlen($field['Type']) > 20) {
|
||||||
|
$onclick .= '1, ';
|
||||||
|
} else {
|
||||||
|
$onclick .= '2, ';
|
||||||
|
}
|
||||||
|
} elseif (strstr($field['True_Type'], 'set')) {
|
||||||
|
$onclick .= '3, ';
|
||||||
|
} elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == false) {
|
||||||
|
// foreign key in a drop-down
|
||||||
|
$onclick .= '4, ';
|
||||||
|
} elseif ($foreigners && isset($foreigners[$field['Field']]) && $foreignData['foreign_link'] == true) {
|
||||||
|
// foreign key with a browsing icon
|
||||||
|
$onclick .= '6, ';
|
||||||
|
} else {
|
||||||
|
$onclick .= '5, ';
|
||||||
|
}
|
||||||
|
$onclick .= '\'' . PMA_escapeJsString($field['Field_html']) . '\', \'' . $field['Field_md5'] . '\', \'' . PMA_escapeJsString($vkey) . '\'); this.checked = true}; return true" />' . "\n";
|
||||||
|
echo $onclick;
|
||||||
}
|
}
|
||||||
echo ' </td>' . "\n";
|
echo ' </td>' . "\n";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user