bug #1253252 [display] Cannot NULL a column with relation defined
This commit is contained in:
@@ -6,6 +6,7 @@ $Id$
|
||||
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
|
||||
|
||||
3.1.2.0 (not yet released)
|
||||
- bug #1253252 [display] Can't NULL a column with relation defined
|
||||
|
||||
3.1.1.0 (not yet released)
|
||||
- patch #2242765 [core] Navi panel server links wrong,
|
||||
|
@@ -23,7 +23,7 @@ function nullify(theType, urlField, md5Field, multi_edit)
|
||||
}
|
||||
|
||||
// "SET" field , "ENUM" field with more than 20 characters
|
||||
// or foreign key field
|
||||
// or foreign key field (drop-down)
|
||||
if (theType == 1 || theType == 3 || theType == 4) {
|
||||
rowForm.elements['field_' + md5Field + multi_edit + '[]'].selectedIndex = -1;
|
||||
}
|
||||
@@ -41,6 +41,10 @@ function nullify(theType, urlField, md5Field, multi_edit)
|
||||
|
||||
} // end if
|
||||
}
|
||||
// foreign key field (with browsing icon for foreign values)
|
||||
else if (theType == 6) {
|
||||
rowForm.elements['field_' + md5Field + multi_edit + '[]'].value = '';
|
||||
}
|
||||
// Other field types
|
||||
else /*if (theType == 5)*/ {
|
||||
rowForm.elements['fields' + multi_edit + '[' + urlField + ']'].value = '';
|
||||
|
@@ -565,6 +565,7 @@ foreach ($rows as $row_id => $vrow) {
|
||||
|
||||
// The null column
|
||||
// ---------------
|
||||
$foreignData = PMA_getForeignData($foreigners, $field['Field'], false, '', '');
|
||||
echo ' <td>' . "\n";
|
||||
if ($field['Null'] == 'YES') {
|
||||
echo ' <input type="hidden" name="fields_null_prev' . $field_name_appendix . '"';
|
||||
@@ -590,8 +591,12 @@ foreach ($rows as $row_id => $vrow) {
|
||||
}
|
||||
} elseif (strstr($field['True_Type'], 'set')) {
|
||||
$onclick .= '3, ';
|
||||
} elseif ($foreigners && isset($foreigners[$field['Field']])) {
|
||||
} 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, ';
|
||||
}
|
||||
@@ -612,7 +617,6 @@ foreach ($rows as $row_id => $vrow) {
|
||||
// See bug #1667887 for the reason why we don't use the maxlength
|
||||
// HTML attribute
|
||||
|
||||
$foreignData = PMA_getForeignData($foreigners, $field['Field'], false, '', '');
|
||||
echo ' <td>' . "\n";
|
||||
if ($foreignData['foreign_link'] == true) {
|
||||
echo $backup_field . "\n";
|
||||
|
Reference in New Issue
Block a user