Do not try to set comment and MIME transformation if field not named.
This commit is contained in:
@@ -166,14 +166,18 @@ if (isset($submit_num_fields)) {
|
||||
// garvin: Update comment table, if a comment was set.
|
||||
if (isset($field_comments) && is_array($field_comments) && $cfgRelation['commwork'] && PMA_MYSQL_INT_VERSION < 40100) {
|
||||
foreach ($field_comments AS $fieldindex => $fieldcomment) {
|
||||
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment, '', 'pmadb');
|
||||
if (!empty($field_name[$fieldindex])) {
|
||||
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment, '', 'pmadb');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// garvin: Update comment table for mime types [MIME]
|
||||
if (isset($field_mimetype) && is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
foreach ($field_mimetype AS $fieldindex => $mimetype) {
|
||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||
if (!empty($field_name[$fieldindex])) {
|
||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user