From 574b9fda874ec4d06cd6aa1e0ae44770ad1e0887 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 15 Aug 2013 14:08:24 +0200 Subject: [PATCH] Fix end of lines --- libraries/tbl_columns_definition_form.inc.php | 310 +++++++++--------- 1 file changed, 155 insertions(+), 155 deletions(-) diff --git a/libraries/tbl_columns_definition_form.inc.php b/libraries/tbl_columns_definition_form.inc.php index 024f8d033c..ea186724ee 100644 --- a/libraries/tbl_columns_definition_form.inc.php +++ b/libraries/tbl_columns_definition_form.inc.php @@ -1,155 +1,155 @@ - $fulltext_indexkey) { - $submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey; - } -} - -for ($columnNumber = 0; $columnNumber < $num_fields; $columnNumber++) { - if (! empty($regenerate)) { - list($columnMeta, $submit_length, $submit_attribute, - $submit_default_current_timestamp, $comments_map, $mime_map) - = PMA_handleRegeneration( - isset($available_mime) ? $mime_map : null, - $comments_map, $mime_map - ); - } elseif (isset($fields_meta[$columnNumber])) { - $columnMeta = PMA_getColumnMetaForDefault( - $fields_meta[$columnNumber], - isset($analyzed_sql[0]['create_table_fields'] - [$fields_meta[$columnNumber]['Field']]['default_value']) - ); - } - - if (isset($columnMeta['Type'])) { - $extracted_columnspec = PMA_Util::extractColumnSpec($columnMeta['Type']); - if ($extracted_columnspec['type'] == 'bit') { - $columnMeta['Default'] - = PMA_Util::convertBitDefaultValue($columnMeta['Default']); - } - $type = $extracted_columnspec['type']; - $length = $extracted_columnspec['spec_in_brackets']; - } else { - // creating a column - $columnMeta['Type'] = ''; - $type = ''; - $length = ''; - } - - // some types, for example longtext, are reported as - // "longtext character set latin7" when their charset and / or collation - // differs from the ones of the corresponding database. - $tmp = strpos($type, 'character set'); - if ($tmp) { - $type = substr($type, 0, $tmp - 1); - } - // rtrim the type, for cases like "float unsigned" - $type = rtrim($type); - - - if (isset($submit_length) && $submit_length != false) { - $length = $submit_length; - } - - - // old column attributes - if ($is_backup) { - $_form_params = PMA_getFormParamsForOldColumn( - $columnMeta, $length, $_form_params - ); - } - - $content_cells[$columnNumber] = PMA_getHtmlForColumnAttributes( - $columnNumber, isset($columnMeta) ? $columnMeta : null, strtoupper($type), - $length_values_input_size, $length, - isset($default_current_timestamp) ? $default_current_timestamp : null, - isset($extracted_columnspec) ? $extracted_columnspec : null, - isset($submit_attribute) ? $submit_attribute : null, - isset($analyzed_sql) ? $analyzed_sql : null, - isset($submit_default_current_timestamp) - ? $submit_default_current_timestamp : null, - $comments_map, isset($fields_meta) ? $fields_meta : null, $is_backup, - isset($move_columns) ? $move_columns : null, $cfgRelation, $available_mime, - $mime_map - ); -} // end for - -$html = PMA_getHtmlForTableCreateOrAddField( - $action, $_form_params, $content_cells, $header_cells -); - -unset($_form_params); - -PMA_Response::getInstance()->addHTML($html); -?> + $fulltext_indexkey) { + $submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey; + } +} + +for ($columnNumber = 0; $columnNumber < $num_fields; $columnNumber++) { + if (! empty($regenerate)) { + list($columnMeta, $submit_length, $submit_attribute, + $submit_default_current_timestamp, $comments_map, $mime_map) + = PMA_handleRegeneration( + isset($available_mime) ? $mime_map : null, + $comments_map, $mime_map + ); + } elseif (isset($fields_meta[$columnNumber])) { + $columnMeta = PMA_getColumnMetaForDefault( + $fields_meta[$columnNumber], + isset($analyzed_sql[0]['create_table_fields'] + [$fields_meta[$columnNumber]['Field']]['default_value']) + ); + } + + if (isset($columnMeta['Type'])) { + $extracted_columnspec = PMA_Util::extractColumnSpec($columnMeta['Type']); + if ($extracted_columnspec['type'] == 'bit') { + $columnMeta['Default'] + = PMA_Util::convertBitDefaultValue($columnMeta['Default']); + } + $type = $extracted_columnspec['type']; + $length = $extracted_columnspec['spec_in_brackets']; + } else { + // creating a column + $columnMeta['Type'] = ''; + $type = ''; + $length = ''; + } + + // some types, for example longtext, are reported as + // "longtext character set latin7" when their charset and / or collation + // differs from the ones of the corresponding database. + $tmp = strpos($type, 'character set'); + if ($tmp) { + $type = substr($type, 0, $tmp - 1); + } + // rtrim the type, for cases like "float unsigned" + $type = rtrim($type); + + + if (isset($submit_length) && $submit_length != false) { + $length = $submit_length; + } + + + // old column attributes + if ($is_backup) { + $_form_params = PMA_getFormParamsForOldColumn( + $columnMeta, $length, $_form_params + ); + } + + $content_cells[$columnNumber] = PMA_getHtmlForColumnAttributes( + $columnNumber, isset($columnMeta) ? $columnMeta : null, strtoupper($type), + $length_values_input_size, $length, + isset($default_current_timestamp) ? $default_current_timestamp : null, + isset($extracted_columnspec) ? $extracted_columnspec : null, + isset($submit_attribute) ? $submit_attribute : null, + isset($analyzed_sql) ? $analyzed_sql : null, + isset($submit_default_current_timestamp) + ? $submit_default_current_timestamp : null, + $comments_map, isset($fields_meta) ? $fields_meta : null, $is_backup, + isset($move_columns) ? $move_columns : null, $cfgRelation, $available_mime, + $mime_map + ); +} // end for + +$html = PMA_getHtmlForTableCreateOrAddField( + $action, $_form_params, $content_cells, $header_cells +); + +unset($_form_params); + +PMA_Response::getInstance()->addHTML($html); +?>