[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2RC1-3148-g754cc88

Michal Čihař nijel at users.sourceforge.net
Mon Jun 6 11:32:31 CEST 2011


The branch, master has been updated
       via  754cc88c39c6cb3c5041c1e6a19651e265de9abb (commit)
      from  6a5a82fc82662de96c1e40f5101dbdb5f8a4eb6b (commit)


- Log -----------------------------------------------------------------
commit 754cc88c39c6cb3c5041c1e6a19651e265de9abb
Author: Michal Čihař <mcihar at novell.com>
Date:   Mon Jun 6 11:31:27 2011 +0200

    Wrap a bit long lines

-----------------------------------------------------------------------

Summary of changes:
 libraries/export/sql.php |  237 +++++++++++++++++++++++++++++++++------------
 1 files changed, 174 insertions(+), 63 deletions(-)

diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index 3ed1c57..1530c53 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -29,28 +29,55 @@ if (isset($plugin_list)) {
         $plugin_list['sql']['options'][] = array('type' => 'begin_group', 'name' => 'general_opts');
 
         /* comments */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'bool', 'name' => 'include_comments', 'text' => __('Display comments <i>(includes info such as export timestamp, PHP version, and server version)</i>')));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'text', 'name' => 'header_comment', 'text' => __('Additional custom header comment (\n splits lines):'));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'bool', 'name' => 'dates', 'text' => __('Include a timestamp of when databases were created, last updated, and last checked'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'begin_subgroup',
+            'subgroup_header' => array(
+                'type' => 'bool',
+                'name' => 'include_comments',
+                'text' => __('Display comments <i>(includes info such as export timestamp, PHP version, and server version)</i>')
+            ));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'text',
+            'name' => 'header_comment',
+            'text' => __('Additional custom header comment (\n splits lines):')
+            );
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'dates',
+            'text' => __('Include a timestamp of when databases were created, last updated, and last checked')
+            );
         if (!empty($GLOBALS['cfgRelation']['relation'])) {
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'relation',
+                'text' => __('Display foreign key relationships')
+                );
         }
         if (!empty($GLOBALS['cfgRelation']['mimework'])) {
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'mime',
+                'text' => __('Display MIME types')
+                );
         }
         $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
         /* end comments */
 
         /* enclose in a transaction */
-        $plugin_list['sql']['options'][] = array('type' => 'bool', 'name' => 'use_transaction', 'text' => __('Enclose export in a transaction'), 'doc' => array('programs', 'mysqldump', 'option_mysqldump_single-transaction'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'use_transaction',
+            'text' => __('Enclose export in a transaction'),
+            'doc' => array('programs', 'mysqldump', 'option_mysqldump_single-transaction')
+            );
 
         /* disable foreign key checks */
-        $plugin_list['sql']['options'][] = array('type' => 'bool', 'name' => 'disable_fk', 'text' => __('Disable foreign key checks'), 'doc' => array('manual_MySQL_Database_Administration', 'server-system-variables', 'sysvar_foreign_key_checks'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'disable_fk',
+            'text' => __('Disable foreign key checks'),
+            'doc' => array('manual_MySQL_Database_Administration', 'server-system-variables', 'sysvar_foreign_key_checks')
+            );
 
         $plugin_list['sql']['options_text'] = __('Options');
 
@@ -61,34 +88,61 @@ if (isset($plugin_list)) {
             foreach($compats as $val) {
                 $values[$val] = $val;
             }
-            $plugin_list['sql']['options'][] =
-                array('type' => 'select', 'name' => 'compatibility', 'text' => __('Database system or older MySQL server to maximize output compatibility with:'), 'values' => $values, 'doc' => array('manual_MySQL_Database_Administration', 'Server_SQL_mode'));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'select',
+                'name' => 'compatibility',
+                'text' => __('Database system or older MySQL server to maximize output compatibility with:'),
+                'values' => $values,
+                'doc' => array('manual_MySQL_Database_Administration', 'Server_SQL_mode')
+                );
             unset($values);
         }
 
         /* server export options */
         if ($plugin_param['export_type'] == 'server') {
-        $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'drop_database', 'text' => sprintf(__('Add %s statement'), '<code>DROP DATABASE</code>'));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'drop_database',
+                'text' => sprintf(__('Add %s statement'), '<code>DROP DATABASE</code>')
+                );
          }
 
         /* what to dump (structure/data/both) */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'message_only', 'text' => __('Dump table')));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'begin_subgroup',
+            'subgroup_header' => array(
+                'type' => 'message_only',
+                'text' => __('Dump table')
+            ));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'radio',
+            'name' => 'structure_or_data',
+            'values' => array(
+                'structure' => __('structure'),
+                'data' => __('data'),
+                'structure_and_data' => __('structure and data')
+            ));
         $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
 
         $plugin_list['sql']['options'][] = array('type' => 'end_group');
 
         /* begin Structure options */
          if (!$hide_structure) {
-            $plugin_list['sql']['options'][] =
-                array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'begin_group',
+                'name' => 'structure',
+                'text' => __('Object creation options'),
+                'force' => 'data'
+                );
 
             /* begin SQL Statements */
-            $plugin_list['sql']['options'][] =
-                array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'message_only', 'name' => 'add_statements', 'text' => __('Add statements:')));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'begin_subgroup',
+                'subgroup_header' => array(
+                    'type' => 'message_only',
+                    'name' => 'add_statements',
+                    'text' => __('Add statements:')
+                ));
              if ($plugin_param['export_type'] == 'table') {
                 if (PMA_Table::isView($GLOBALS['db'], $GLOBALS['table'])) {
                     $drop_clause = '<code>DROP VIEW</code>';
@@ -101,74 +155,131 @@ if (isset($plugin_list)) {
                     $drop_clause .= '<code> / EVENT</code>';
                 }
             }
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'drop_table', 'text' => sprintf(__('Add %s statement'), $drop_clause));
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'procedure_function', 'text' => sprintf(__('Add %s statement'), '<code>CREATE PROCEDURE / FUNCTION' . (PMA_MYSQL_INT_VERSION > 50100 ? ' / EVENT</code>' : '</code>')));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'drop_table',
+                'text' => sprintf(__('Add %s statement'), $drop_clause)
+                );
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'procedure_function',
+                'text' => sprintf(__('Add %s statement'), '<code>CREATE PROCEDURE / FUNCTION' . (PMA_MYSQL_INT_VERSION > 50100 ? ' / EVENT</code>' : '</code>'))
+                );
 
             /* begin CREATE TABLE statements*/
-            $plugin_list['sql']['options'][] =
-                array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'bool', 'name' => 'create_table_statements', 'text' => __('<code>CREATE TABLE</code> options:')));
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'if_not_exists', 'text' => '<code>IF NOT EXISTS</code>');
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'auto_increment', 'text' => '<code>AUTO_INCREMENT</code>');
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'begin_subgroup',
+                'subgroup_header' => array(
+                    'type' => 'bool',
+                    'name' => 'create_table_statements',
+                    'text' => __('<code>CREATE TABLE</code> options:')
+                ));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'if_not_exists',
+                'text' => '<code>IF NOT EXISTS</code>'
+                );
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'auto_increment',
+                'text' => '<code>AUTO_INCREMENT</code>'
+                );
             $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
             /* end CREATE TABLE statements */
 
             $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
             /* end SQL statements */
 
-            $plugin_list['sql']['options'][] =
-                array('type' => 'bool', 'name' => 'backquotes', 'text' => __('Enclose table and field names with backquotes <i>(Protects field and table names formed with special characters or keywords)</i>'));
+            $plugin_list['sql']['options'][] = array(
+                'type' => 'bool',
+                'name' => 'backquotes',
+                'text' => __('Enclose table and field names with backquotes <i>(Protects field and table names formed with special characters or keywords)</i>')
+                );
 
-            $plugin_list['sql']['options'][] =
-                array('type' => 'end_group');
+            $plugin_list['sql']['options'][] = array('type' => 'end_group');
         }
         /* end Structure options */
 
         /* begin Data options */
-         $plugin_list['sql']['options'][] =
-            array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
+         $plugin_list['sql']['options'][] = array(
+            'type' => 'begin_group',
+            'name' => 'data',
+            'text' => __('Data dump options'),
+            'force' => 'structure'
+            );
 
         /* begin SQL statements */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'message_only', 'text' => __('Instead of <code>INSERT</code> statements, use:')));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'bool', 'name' => 'delayed', 'text' => __('<code>INSERT DELAYED</code> statements'), 'doc' => array('manual_MySQL_Database_Administration', 'insert_delayed'));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'bool', 'name' => 'ignore', 'text' => __('<code>INSERT IGNORE</code> statements'), 'doc' => array('manual_MySQL_Database_Administration', 'insert'));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'end_subgroup');
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'begin_subgroup',
+            'subgroup_header' => array(
+                'type' => 'message_only',
+                'text' => __('Instead of <code>INSERT</code> statements, use:')
+            ));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'delayed',
+            'text' => __('<code>INSERT DELAYED</code> statements'),
+            'doc' => array('manual_MySQL_Database_Administration', 'insert_delayed')
+            );
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'ignore',
+            'text' => __('<code>INSERT IGNORE</code> statements'),
+            'doc' => array('manual_MySQL_Database_Administration', 'insert')
+            );
+        $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
         /* end SQL statements */
 
         /* Function to use when dumping data */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'select', 'name' => 'type', 'text' => __('Function to use when dumping data:'), 'values' => array('INSERT' => 'INSERT', 'UPDATE' => 'UPDATE', 'REPLACE' => 'REPLACE'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'select',
+            'name' => 'type',
+            'text' => __('Function to use when dumping data:'),
+            'values' => array(
+                'INSERT' => 'INSERT',
+                'UPDATE' => 'UPDATE',
+                'REPLACE' => 'REPLACE'
+                )
+            );
 
         /* Syntax to use when inserting data */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'begin_subgroup', 'subgroup_header' => array('type' => 'message_only', 'text' => __('Syntax to use when inserting data:')));
-        $plugin_list['sql']['options'][] =
-            array('type' => 'radio', 'name' => 'insert_syntax', 'values' => array(
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'begin_subgroup',
+            'subgroup_header' => array(
+                'type' => 'message_only',
+                'text' => __('Syntax to use when inserting data:')
+            ));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'radio',
+            'name' => 'insert_syntax',
+            'values' => array(
                 'complete' => __('include column names in every <code>INSERT</code> statement <br />       Example: <code>INSERT INTO tbl_name (col_A,col_B,col_C) VALUES (1,2,3)</code>'),
                 'extended' => __('insert multiple rows in every <code>INSERT</code> statement<br />       Example: <code>INSERT INTO tbl_name VALUES (1,2,3), (4,5,6), (7,8,9)</code>'),
                 'both' => __('both of the above<br />       Example: <code>INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)</code>'),
-                'none' => __('neither of the above<br />       Example: <code>INSERT INTO tbl_name VALUES (1,2,3)</code>')));
-          $plugin_list['sql']['options'][] =
-            array('type' => 'end_subgroup');
+                'none' => __('neither of the above<br />       Example: <code>INSERT INTO tbl_name VALUES (1,2,3)</code>')
+            ));
+          $plugin_list['sql']['options'][] = array('type' => 'end_subgroup');
 
         /* Max length of query */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'text', 'name' => 'max_query_size', 'text' => __('Maximal length of created query'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'text',
+            'name' => 'max_query_size',
+            'text' => __('Maximal length of created query')
+            );
 
         /* Dump binary columns in hexadecimal */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'bool', 'name' => 'hex_for_blob', 'text' => __('Dump binary columns in hexadecimal notation <i>(for example, "abc" becomes 0x616263)</i>'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'hex_for_blob',
+            'text' => __('Dump binary columns in hexadecimal notation <i>(for example, "abc" becomes 0x616263)</i>')
+            );
 
         /* Dump time in UTC */
-        $plugin_list['sql']['options'][] =
-            array('type' => 'bool', 'name' => 'utc_time', 'text' => __('Dump TIMESTAMP columns in UTC <i>(enables TIMESTAMP columns to be dumped and reloaded between servers in different time zones)</i>'));
+        $plugin_list['sql']['options'][] = array(
+            'type' => 'bool',
+            'name' => 'utc_time',
+            'text' => __('Dump TIMESTAMP columns in UTC <i>(enables TIMESTAMP columns to be dumped and reloaded between servers in different time zones)</i>')
+            );
 
         $plugin_list['sql']['options'][] = array('type' => 'end_group');
          /* end Data options */


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list