Export options

This commit is contained in:
Crack
2010-07-03 22:45:14 +02:00
parent 9130ebb7b6
commit 2fab9fbf28
5 changed files with 291 additions and 13 deletions

View File

@@ -1139,6 +1139,13 @@ $cfg['Export']['file_template_database'] = '__DB__';
*/
$cfg['Export']['file_template_server'] = '__SERVER__';
/**
*
*
* @global $cfg['Export']['codegen_format']
*/
$cfg['Export']['codegen_format'] = 0;
/**
*
*
@@ -1328,6 +1335,13 @@ $cfg['Export']['csv_escaped'] = '\\';
*/
$cfg['Export']['csv_terminated'] = 'AUTO';
/**
*
*
* @global string $cfg['Export']['csv_removeCRLF']
*/
$cfg['Export']['csv_removeCRLF'] = false;
/**
*
*
@@ -1349,6 +1363,13 @@ $cfg['Export']['excel_null'] = 'NULL';
*/
$cfg['Export']['excel_edition'] = 'win';
/**
*
*
* @global string $cfg['Export']['excel_removeCRLF']
*/
$cfg['Export']['excel_removeCRLF'] = false;
/**
*
*
@@ -1587,7 +1608,7 @@ $cfg['Export']['sql_hex_for_blob'] = true;
*
* @global string $cfg['Export']['sql_type']
*/
$cfg['Export']['sql_type'] = 'insert';
$cfg['Export']['sql_type'] = 'INSERT';
/**
*

View File

@@ -71,7 +71,7 @@ $cfg_db['Import']['format'] = array(
'docsql', // DocSQL
'ldi', // CSV using LOAD DATA
'sql'); // SQL
$cfg_db['Import']['sql_compatibility'] = array(
$cfg_db['Import']['sql_compatibility'] = $cfg_db['Export']['sql_compatibility'] = array(
'NONE', 'ANSI', 'DB2', 'MAXDB', 'MYSQL323', 'MYSQL40', 'MSSQL', 'ORACLE',
// removed; in MySQL 5.0.33, this produces exports that
// can't be read by POSTGRESQL (see our bug #1596328)
@@ -86,6 +86,7 @@ $cfg_db['Export']['charset'] = array_merge(array(''), $GLOBALS['cfg']['Available
$cfg_db['Export']['codegen_format'] = array('#', 'NHibernate C# DO', 'NHibernate XML');
$cfg_db['Export']['excel_edition'] = array('win' => 'Windows',
'mac_excel2003' => 'Excel 2003 / Macintosh', 'mac_excel2008' => 'Excel 2008 / Macintosh');
$cfg_db['Export']['sql_type'] = array('INSERT', 'UPDATE', 'REPLACE');
/**
* Default values overrides
@@ -104,6 +105,7 @@ $cfg_db['_validators'] = array(
'CharTextareaCols' => 'validate_positive_number',
'CharTextareaRows' => 'validate_positive_number',
'DefaultPropDisplay' => 'validate_DefaultPropDisplay',
'Export/sql_max_query_size' => 'validate_positive_number',
'ForeignKeyMaxLimit' => 'validate_positive_number',
'Import/csv_enclosed' => 'validate_str01',
'Import/csv_escaped' => 'validate_str1',

View File

@@ -69,14 +69,84 @@ $strSetupExecTimeLimit_desc = __('Set the number of seconds a script is allowed
$strSetupExecTimeLimit_name = __('Maximum execution time');
$strSetupExport_asfile_name = __('Save as file');
$strSetupExport_charset_name = __('Character set of the file');
$strSetupExport_codegen_format_name = __('Format');
$strSetupExport_compression_name = __('Compression');
$strSetupExport_csv_columns_name = __('Put columns names in the first row');
$strSetupExport_csv_enclosed_name = __('Columns enclosed by');
$strSetupExport_csv_escaped_name = __('Columns escaped by');
$strSetupExport_csv_null_name = __('Replace NULL by');
$strSetupExport_csv_removeCRLF_name = __('Remove CRLF characters within columns');
$strSetupExport_csv_separator_name = __('Columns terminated by');
$strSetupExport_csv_terminated_name = __('Lines terminated by');
$strSetupExport_excel_columns_name = __('Put columns names in the first row');
$strSetupExport_excel_edition_name = __('Excel edition');
$strSetupExport_excel_null_name = __('Replace NULL by');
$strSetupExport_excel_removeCRLF_name = __('Remove CRLF characters within columns');
$strSetupExport_file_template_database_name = __('Database name template');
$strSetupExport_file_template_server_name = __('Server name template');
$strSetupExport_file_template_table_name = __('Table name template');
$strSetupExport_format_name = __('Format');
$strSetupExport_htmlword_columns_name = __('Put columns names in the first row');
$strSetupExport_htmlword_data_name = __('Data');
$strSetupExport_htmlword_null_name = __('Replace NULL by');
$strSetupExport_htmlword_structure_name = __('Structure');
$strSetupExport_latex_caption_name = __('Include table caption');
$strSetupExport_latex_columns_name = __('Put columns names in the first row');
$strSetupExport_latex_comments_name = __('Comments');
$strSetupExport_latex_data_caption_name = __('Table caption');
$strSetupExport_latex_data_continued_caption_name = __('Continued table caption');
$strSetupExport_latex_data_label_name = __('Label key');
$strSetupExport_latex_data_name = __('Data');
$strSetupExport_latex_mime_name = __('MIME type');
$strSetupExport_latex_null_name = __('Replace NULL by');
$strSetupExport_latex_relation_name = __('Relations');
$strSetupExport_latex_structure_caption_name = __('Table caption');
$strSetupExport_latex_structure_continued_caption_name = __('Continued table caption');
$strSetupExport_latex_structure_label_name = __('Label key');
$strSetupExport_latex_structure_name = __('Structure');
$strSetupExport_ods_columns_name = __('Put columns names in the first row');
$strSetupExport_ods_null_name = __('Replace NULL by');
$strSetupExport_odt_columns_name = __('Put columns names in the first row');
$strSetupExport_odt_comments_name = __('Comments');
$strSetupExport_odt_data_name = __('Data');
$strSetupExport_odt_mime_name = __('MIME type');
$strSetupExport_odt_null_name = __('Replace NULL by');
$strSetupExport_odt_relation_name = __('Relations');
$strSetupExport_odt_structure_name = __('Structure');
$strSetupExport_onserver_name = __('Save on server');
$strSetupExport_onserver_overwrite_name = __('Overwrite existing file(s)');
$strSetupExport_sql_auto_increment_name = __('Add AUTO_INCREMENT value');
$strSetupExport_sql_backquotes_name = __('Enclose table and column names with backquotes');
$strSetupExport_sql_columns_name = __('Complete inserts');
$strSetupExport_sql_compatibility_name = __('SQL compatibility mode');
$strSetupExport_sql_data_name = __('Data');
$strSetupExport_sql_dates_name = __('Creation/Update/Check dates');
$strSetupExport_sql_delayed_name = __('Use delayed inserts');
$strSetupExport_sql_disable_fk_name = __('Disable foreign key checks');
$strSetupExport_sql_drop_database_name = sprintf(__('Add %s'), 'DROP DATABASE');
$strSetupExport_sql_drop_table_name = sprintf(__('Add %s'), 'DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT');
$strSetupExport_sql_extended_name = __('Extended inserts');
$strSetupExport_sql_hex_for_blob_name = __('Use hexadecimal for BLOB');
$strSetupExport_sql_if_not_exists_name = sprintf(__('Add %s'), 'IF NOT EXISTS');
$strSetupExport_sql_ignore_name = __('Use ignore inserts');
$strSetupExport_sql_include_comments_name = __('Comments');
$strSetupExport_sql_max_query_size_name = __('Maximal length of created query');
$strSetupExport_sql_mime_name = __('MIME type');
$strSetupExport_sql_procedure_function_name = sprintf(__('Add %s'), 'CREATE PROCEDURE / FUNCTION / EVENT');
$strSetupExport_sql_relation_name = __('Relations');
$strSetupExport_sql_structure_name = __('Structure');
$strSetupExport_sql_type_name = __('Export type');
$strSetupExport_sql_use_transaction_name = __('Enclose export in a transaction');
$strSetupExport_sql_utc_time_name = __('Export time in UTC');
$strSetupExport_remember_file_template_name = __('Remember file name template');
$strSetupExport_texytext_columns_name = __('Put columns names in the first row');
$strSetupExport_texytext_data_name = __('Data');
$strSetupExport_texytext_null_name = __('Replace NULL by');
$strSetupExport_texytext_structure_name = __('Structure');
$strSetupExport_xls_columns_name = __('Put columns names in the first row');
$strSetupExport_xls_null_name = __('Replace NULL by');
$strSetupExport_xlsx_columns_name = __('Put columns names in the first row');
$strSetupExport_xlsx_null_name = __('Replace NULL by');
$strSetupForceSSL_desc = __('Force secured connection while using phpMyAdmin');
$strSetupForceSSL_name = __('Force SSL connection');
$strSetupForeignKeyDropdownOrder_desc = __('Sort order for items in a foreign-key dropdown box; [kbd]content[/kbd] is the referenced data, [kbd]id[/kbd] is the key value');
@@ -85,12 +155,12 @@ $strSetupForeignKeyMaxLimit_desc = __('A dropdown will be used if fewer items ar
$strSetupForeignKeyMaxLimit_name = __('Foreign key limit');
$strSetupForm_Browse = __('Browse mode');
$strSetupForm_Browse_desc = __('Customize browse mode');
$strSetupForm_CodeGen = 'CodeGen';
$strSetupForm_CodeGen_desc = __('Customize default options');
$strSetupForm_Csv = __('CSV');
$strSetupForm_Csv_desc = __('Customize default options');
$strSetupForm_Edit_desc = __('Customize edit mode');
$strSetupForm_Edit = __('Edit mode');
$strSetupForm_Excel = __('Excel Workbook');
$strSetupForm_Excel_desc = __('Customize default options');
$strSetupForm_Export_defaults_desc = __('Customize default export options');
$strSetupForm_Export_defaults = __('Export defaults');
$strSetupForm_General = __('General settings');
@@ -98,6 +168,8 @@ $strSetupForm_Import_defaults_desc = __('Customize default common import options
$strSetupForm_Import_defaults = __('Import defaults');
$strSetupForm_Import_export_desc = __('Set import and export directories and compression options');
$strSetupForm_Import_export = __('Import / export');
$strSetupForm_Latex = __('LaTeX');
$strSetupForm_Latex_desc = __('Customize default options');
$strSetupForm_Ldi = __('CSV using LOAD DATA');
$strSetupForm_Ldi_desc = __('Customize default options');
$strSetupForm_Left_databases = __('Databases');
@@ -109,8 +181,10 @@ $strSetupForm_Left_servers = __('Servers');
$strSetupForm_Left_tables_desc = __('Tables display options');
$strSetupForm_Left_tables = __('Tables');
$strSetupForm_Main_frame = __('Main frame');
$strSetupForm_Ods = __('Open Document Spreadsheet');
$strSetupForm_Ods_desc = __('Customize default options');
$strSetupForm_Microsoft_Office = __('Microsoft Office');
$strSetupForm_Microsoft_Office_desc = __('Customize default options');
$strSetupForm_Open_Document = __('Open Document');
$strSetupForm_Open_Document_desc = __('Customize default options');
$strSetupForm_Other_core_settings_desc = __('Settings that didn\'t fit enywhere else');
$strSetupForm_Other_core_settings = __('Other core settings');
$strSetupForm_Query_window_desc = __('Customize query window options');
@@ -131,6 +205,8 @@ $strSetupForm_Server_pmadb_desc = __('Configure phpMyAdmin database to gain acce
$strSetupForm_Server_pmadb = __('PMA database');
$strSetupForm_Server_tracking_desc = __('Tracking of changes made in database. Requires configured PMA database.');
$strSetupForm_Server_tracking = __('Changes tracking');
$strSetupForm_Texy = __('Texy! text');
$strSetupForm_Texy_desc = __('Customize default options');
$strSetupFormset_Export = __('Customize export options');
$strSetupFormset_Features = __('Features');
$strSetupFormset_Import = __('Customize import defaults');
@@ -174,8 +250,8 @@ $strSetupImport_sql_compatibility_name = __('SQL compatibility mode');
$strSetupImport_sql_no_auto_value_on_zero_name = __('Do not use AUTO_INCREMENT for zero values');
$strSetupImport_skip_queries_desc = __('Number of queries to skip from start');
$strSetupImport_skip_queries_name = __('Partial import: skip queries');
$strSetupImport_xls_col_names_name = __('Column names in first row') . ' (Excel 97-2003)';
$strSetupImport_xlsx_col_names_name = __('Column names in first row') . ' (Excel 2007+)';
$strSetupImport_xls_col_names_name = __('Column names in first row');
$strSetupImport_xlsx_col_names_name = __('Column names in first row');
$strSetupInitialSlidersState_name = __('Initial state for sliders');
$strSetupInsertRows_desc = __('How many rows can be inserted at one time');
$strSetupInsertRows_name = __('Number of inserted rows');

View File

@@ -213,10 +213,13 @@ $forms['Import']['Ldi'] = array('Import' => array(
'ldi_enclosed',
'ldi_escaped',
'ldi_local_option'));
$forms['Import']['Excel'] = array('Import' => array(
$forms['Import']['Microsoft_Office'] = array('Import' => array(
':group:' . __('Excel 97-2003 XLS Workbook'),
'xls_col_names',
':group:' . __('Excel 2007 XLSX Workbook'),
'xlsx_col_names'));
$forms['Import']['Ods'] = array('Import' => array(
$forms['Import']['Open_Document'] = array('Import' => array(
':group:' . __('Open Document Spreadsheet'),
'ods_col_names',
'ods_empty_rows',
'ods_recognize_percentages',
@@ -224,12 +227,99 @@ $forms['Import']['Ods'] = array('Import' => array(
$forms['Export']['Export_defaults'] = array('Export' => array(
'format',
'compression',
'asfile',
'charset',
'asfile' => ':group',
'onserver',
'onserver_overwrite',
':group:end',
'remember_file_template',
'file_template_table',
'file_template_database',
'file_template_server'));
$forms['Export']['Sql'] = array('Export' => array(
'sql_include_comments',
'sql_use_transaction',
'sql_disable_fk',
'sql_compatibility',
':group:' . __('Database export options'),
'sql_drop_database',
'sql_structure' => ':group',
'sql_drop_table',
'sql_if_not_exists',
'sql_auto_increment',
'sql_backquotes',
'sql_procedure_function',
':group:' . __('Add into comments'),
'sql_dates',
'sql_relation',
'sql_mime',
'sql_data' => ':group',
'sql_columns',
'sql_extended',
'sql_max_query_size',
'sql_delayed',
'sql_ignore',
'sql_hex_for_blob',
'sql_utc_time',
'sql_type'));
$forms['Export']['CodeGen'] = array('Export' => array(
'codegen_format'));
$forms['Export']['Csv'] = array('Export' => array(
':group:' . __('CSV'),
'csv_separator',
'csv_enclosed',
'csv_escaped',
'csv_terminated',
'csv_null',
'csv_removeCRLF',
'csv_columns',
':group:' . __('CSV for MS Excel'),
'excel_null',
'excel_removeCRLF',
'excel_columns',
'excel_edition'));
$forms['Export']['Latex'] = array('Export' => array(
'latex_caption',
'latex_structure' => ':group',
'latex_structure_caption',
'latex_structure_continued_caption',
'latex_structure_label',
'latex_relation',
'latex_comments',
'latex_mime',
'latex_data' => ':group',
'latex_columns',
'latex_data_caption',
'latex_data_continued_caption',
'latex_data_label',
'latex_null'));
$forms['Export']['Microsoft_Office'] = array('Export' => array(
':group:' . __('Excel 97-2003 XLS Workbook'),
'xls_null',
'xls_columns',
':group:' . __('Excel 2007 XLSX Workbook'),
'xlsx_null',
'xlsx_columns',
':group:' . __('Microsoft Word 2000'),
'htmlword_structure',
'htmlword_data',
'htmlword_null',
'htmlword_columns'));
$forms['Export']['Open_Document'] = array('Export' => array(
':group:' . __('Open Document Spreadsheet'),
'ods_null',
'ods_columns',
':group:' . __('Open Document Text'),
'odt_structure' => ':group',
'odt_relation',
'odt_comments',
'odt_mime',
'odt_data' => ':group',
'odt_columns',
'odt_null'));
$forms['Export']['Texy'] = array('Export' => array(
'texytext_structure',
'texytext_data' => ':group',
'texytext_null',
'texytext_columns'));
?>

View File

@@ -118,10 +118,13 @@ $forms['Import']['Ldi'] = array(
'Import/ldi_enclosed',
'Import/ldi_escaped',
'Import/ldi_local_option');
$forms['Import']['Excel'] = array(
$forms['Import']['Microsoft_Office'] = array(
':group:' . __('Excel 97-2003 XLS Workbook'),
'Import/xls_col_names',
':group:' . __('Excel 2007 XLSX Workbook'),
'Import/xlsx_col_names');
$forms['Import']['Ods'] = array(
$forms['Import']['Open_Document'] = array(
':group:' . __('Open Document Spreadsheet'),
'Import/ods_col_names',
'Import/ods_empty_rows',
'Import/ods_recognize_percentages',
@@ -133,4 +136,90 @@ $forms['Export']['Export_defaults'] = array(
'Export/file_template_table',
'Export/file_template_database',
'Export/file_template_server');
$forms['Export']['Sql'] = array(
'Export/sql_include_comments',
'Export/sql_use_transaction',
'Export/sql_disable_fk',
'Export/sql_compatibility',
':group:' . __('Database export options'),
'Export/sql_drop_database',
'Export/sql_structure' => ':group',
'Export/sql_drop_table',
'Export/sql_if_not_exists',
'Export/sql_auto_increment',
'Export/sql_backquotes',
'Export/sql_procedure_function',
':group:' . __('Add into comments'),
'Export/sql_dates',
'Export/sql_relation',
'Export/sql_mime',
'Export/sql_data' => ':group',
'Export/sql_columns',
'Export/sql_extended',
'Export/sql_max_query_size',
'Export/sql_delayed',
'Export/sql_ignore',
'Export/sql_hex_for_blob',
'Export/sql_utc_time',
'Export/sql_type');
$forms['Export']['CodeGen'] = array(
'Export/codegen_format');
$forms['Export']['Csv'] = array(
':group:' . __('CSV'),
'Export/csv_separator',
'Export/csv_enclosed',
'Export/csv_escaped',
'Export/csv_terminated',
'Export/csv_null',
'Export/csv_removeCRLF',
'Export/csv_columns',
':group:' . __('CSV for MS Excel'),
'Export/excel_null',
'Export/excel_removeCRLF',
'Export/excel_columns',
'Export/excel_edition');
$forms['Export']['Latex'] = array(
'Export/latex_caption',
'Export/latex_structure' => ':group',
'Export/latex_structure_caption',
'Export/latex_structure_continued_caption',
'Export/latex_structure_label',
'Export/latex_relation',
'Export/latex_comments',
'Export/latex_mime',
'Export/latex_data' => ':group',
'Export/latex_columns',
'Export/latex_data_caption',
'Export/latex_data_continued_caption',
'Export/latex_data_label',
'Export/latex_null');
$forms['Export']['Microsoft_Office'] = array(
':group:' . __('Excel 97-2003 XLS Workbook'),
'Export/xls_null',
'Export/xls_columns',
':group:' . __('Excel 2007 XLSX Workbook'),
'Export/xlsx_null',
'Export/xlsx_columns',
':group:' . __('Microsoft Word 2000'),
'Export/htmlword_structure',
'Export/htmlword_data',
'Export/htmlword_null',
'Export/htmlword_columns');
$forms['Export']['Open_Document'] = array(
':group:' . __('Open Document Spreadsheet'),
'Export/ods_null',
'Export/ods_columns',
':group:' . __('Open Document Text'),
'Export/odt_structure' => ':group',
'Export/odt_relation',
'Export/odt_comments',
'Export/odt_mime',
'Export/odt_data' => ':group',
'Export/odt_columns',
'Export/odt_null');
$forms['Export']['Texy'] = array(
'Export/texytext_structure',
'Export/texytext_data' => ':group',
'Export/texytext_null',
'Export/texytext_columns');
?>