[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-4491-gffc01b1

Michal Čihař nijel at users.sourceforge.net
Tue Jun 21 11:41:18 CEST 2011


The branch, master has been updated
       via  ffc01b199aa99744a4b21d7b3bdfb24c593bb314 (commit)
       via  76d4046858648eeed4d8fa880bf1216ea3bcdf57 (commit)
      from  4bbdebe22e5eb62cffbcfa0619713fff25c02734 (commit)


- Log -----------------------------------------------------------------
commit ffc01b199aa99744a4b21d7b3bdfb24c593bb314
Author: Michal Čihař <mcihar at suse.cz>
Date:   Tue Jun 21 11:41:05 2011 +0200

    Define subpackages for import modules

commit 76d4046858648eeed4d8fa880bf1216ea3bcdf57
Author: Michal Čihař <mcihar at suse.cz>
Date:   Tue Jun 21 11:39:21 2011 +0200

    Use subpackages for export formats

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

Summary of changes:
 libraries/export/codegen.php   |    6 ++++--
 libraries/export/csv.php       |    3 ++-
 libraries/export/excel.php     |    3 ++-
 libraries/export/htmlword.php  |    3 ++-
 libraries/export/json.php      |    3 ++-
 libraries/export/latex.php     |    3 ++-
 libraries/export/mediawiki.php |    3 ++-
 libraries/export/ods.php       |    3 ++-
 libraries/export/odt.php       |    3 ++-
 libraries/export/pdf.php       |    6 ++++--
 libraries/export/php_array.php |    3 ++-
 libraries/export/sql.php       |    3 ++-
 libraries/export/texytext.php  |    3 ++-
 libraries/export/xls.php       |    3 ++-
 libraries/export/xlsx.php      |    3 ++-
 libraries/export/xml.php       |    3 ++-
 libraries/export/yaml.php      |    3 ++-
 libraries/import/csv.php       |    1 +
 libraries/import/docsql.php    |    1 +
 libraries/import/ldi.php       |    3 ++-
 libraries/import/ods.php       |    2 +-
 libraries/import/sql.php       |    7 ++++---
 libraries/import/xls.php       |   17 +++++++++--------
 libraries/import/xlsx.php      |   17 +++++++++--------
 libraries/import/xml.php       |   40 ++++++++++++++++++++--------------------
 25 files changed, 85 insertions(+), 60 deletions(-)

diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php
index 56c9d08..bb4510a 100644
--- a/libraries/export/codegen.php
+++ b/libraries/export/codegen.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build NHibernate dumps of tables
  *
- * @package phpMyAdmin-Export-Codegen
+ * @package phpMyAdmin-Export
+ * @subpackage Codegen
  */
 if (! defined('PHPMYADMIN')) {
     exit;
@@ -148,7 +149,8 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
 
 /**
  *
- * @package phpMyAdmin-Export-Codegen
+ * @package phpMyAdmin-Export
+ * @subpackage Codegen
  */
 class TableProperty
 {
diff --git a/libraries/export/csv.php b/libraries/export/csv.php
index 050db6c..62b1537 100644
--- a/libraries/export/csv.php
+++ b/libraries/export/csv.php
@@ -3,7 +3,8 @@
 /**
  * CSV export code
  *
- * @package phpMyAdmin-Export-CSV
+ * @package phpMyAdmin-Export
+ * @subpackage CSV
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/excel.php b/libraries/export/excel.php
index 5afbd7e..df329de 100644
--- a/libraries/export/excel.php
+++ b/libraries/export/excel.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build CSV dumps of tables for excel
  *
- * @package phpMyAdmin-Export-CSV-Excel
+ * @package phpMyAdmin-Export
+ * @subpackage CSV-Excel
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index 6598873..af5af76 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build HTML dumps of tables
  *
- * @package phpMyAdmin-Export-HTMLWord
+ * @package phpMyAdmin-Export
+ * @subpackage HTMLWord
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/json.php b/libraries/export/json.php
index d45c01b..c9bba1e 100644
--- a/libraries/export/json.php
+++ b/libraries/export/json.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build dumps of tables as JSON
  *
- * @package phpMyAdmin-Export-JSON
+ * @package phpMyAdmin-Export
+ * @subpackage JSON
  */
  */
 if (! defined('PHPMYADMIN')) {
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 01e7ea1..565c29c 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build LaTeX dumps of tables
  *
- * @package phpMyAdmin-Export-Latex
+ * @package phpMyAdmin-Export
+ * @subpackage Latex
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/mediawiki.php b/libraries/export/mediawiki.php
index 2363979..538c31c 100644
--- a/libraries/export/mediawiki.php
+++ b/libraries/export/mediawiki.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build MediaWiki dumps of tables
  *
- * @package phpMyAdmin-Export-MediaWiki
+ * @package phpMyAdmin-Export
+ * @subpackage MediaWiki
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/ods.php b/libraries/export/ods.php
index 0237627..699aa0f 100644
--- a/libraries/export/ods.php
+++ b/libraries/export/ods.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build OpenDocument Spreadsheet dumps of tables
  *
- * @package phpMyAdmin-Export-ODS
+ * @package phpMyAdmin-Export
+ * @subpackage ODS
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index 2210a12..d3c42de 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build OpenDocument Text dumps of tables
  *
- * @package phpMyAdmin-Export-ODT
+ * @package phpMyAdmin-Export
+ * @subpackage ODT
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php
index fe9b46c..e864454 100644
--- a/libraries/export/pdf.php
+++ b/libraries/export/pdf.php
@@ -3,7 +3,8 @@
 /**
  * Produce a PDF report (export) from a query
  *
- * @package phpMyAdmin-Export-PDF
+ * @package phpMyAdmin-Export
+ * @subpackage PDF
  */
 if (! defined('PHPMYADMIN')) {
     exit;
@@ -39,7 +40,8 @@ require_once './libraries/tcpdf/tcpdf.php';
 
 /**
  * Adapted from a LGPL script by Philip Clarke
- * @package phpMyAdmin-Export-PDF
+ * @package phpMyAdmin-Export
+ * @subpackage PDF
  */
 class PMA_PDF extends TCPDF
 {
diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php
index 2687eb7..66a0aa6 100644
--- a/libraries/export/php_array.php
+++ b/libraries/export/php_array.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build dumps of tables as PHP Arrays
  *
- * @package phpMyAdmin-Export-PHP
+ * @package phpMyAdmin-Export
+ * @subpackage PHP
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index b1bd457..ed61a07 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build SQL dumps of tables
  *
- * @package phpMyAdmin-Export-SQL
+ * @package phpMyAdmin-Export
+ * @subpackage SQL
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/texytext.php b/libraries/export/texytext.php
index d15b43e..2b290f1 100644
--- a/libraries/export/texytext.php
+++ b/libraries/export/texytext.php
@@ -3,7 +3,8 @@
 /**
  * Export to Texy! text.
  *
- * @package phpMyAdmin-Export-Texy
+ * @package phpMyAdmin-Export
+ * @subpackage Texy
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/xls.php b/libraries/export/xls.php
index 4461c2e..2a1f219 100644
--- a/libraries/export/xls.php
+++ b/libraries/export/xls.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build dumps of tables as Excel files.
  *
- * @package phpMyAdmin-Export-XLS
+ * @package phpMyAdmin-Export
+ * @subpackage XLS
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/xlsx.php b/libraries/export/xlsx.php
index db65add..487c2df 100644
--- a/libraries/export/xlsx.php
+++ b/libraries/export/xlsx.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build dumps of tables as Excel 2007 files.
  *
- * @package phpMyAdmin-Export-XLSX
+ * @package phpMyAdmin-Export
+ * @subpackage XLSX
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/xml.php b/libraries/export/xml.php
index de2d12a..ba1e4fa 100644
--- a/libraries/export/xml.php
+++ b/libraries/export/xml.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build XML dumps of tables
  *
- * @package phpMyAdmin-Export-XML
+ * @package phpMyAdmin-Export
+ * @subpackage XML
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/export/yaml.php b/libraries/export/yaml.php
index 9d9f7e5..8c3fad0 100644
--- a/libraries/export/yaml.php
+++ b/libraries/export/yaml.php
@@ -3,7 +3,8 @@
 /**
  * Set of functions used to build YAML dumps of tables
  *
- * @package phpMyAdmin-Export-YAML
+ * @package phpMyAdmin-Export
+ * @subpackage YAML
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/import/csv.php b/libraries/import/csv.php
index 6386333..49cff44 100644
--- a/libraries/import/csv.php
+++ b/libraries/import/csv.php
@@ -5,6 +5,7 @@
  *
  * @todo    add an option for handling NULL values
  * @package phpMyAdmin-Import
+ * @subpackage CSV
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php
index f032e95..3ac799f 100644
--- a/libraries/import/docsql.php
+++ b/libraries/import/docsql.php
@@ -4,6 +4,7 @@
  * DocSQL import plugin for phpMyAdmin
  *
  * @package phpMyAdmin-Import
+ * @subpackage DocSQL
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/import/ldi.php b/libraries/import/ldi.php
index 979013d..56dabf9 100644
--- a/libraries/import/ldi.php
+++ b/libraries/import/ldi.php
@@ -1,9 +1,10 @@
 <?php
 /* vim: set expandtab sw=4 ts=4 sts=4: */
 /**
- * CSV import plugin for phpMyAdmin
+ * CSV import plugin for phpMyAdmin using LOAD DATA
  *
  * @package phpMyAdmin-Import
+ * @subpackage LDI
  */
 if (! defined('PHPMYADMIN')) {
     exit;
diff --git a/libraries/import/ods.php b/libraries/import/ods.php
index 9d41bb4..29952f9 100644
--- a/libraries/import/ods.php
+++ b/libraries/import/ods.php
@@ -5,8 +5,8 @@
  *
  * @todo    Pretty much everything
  * @todo    Importing of accented characters seems to fail
- * @version 0.5-beta
  * @package phpMyAdmin-Import
+ * @subpackage ODS
  */
 
 if (! defined('PHPMYADMIN')) {
diff --git a/libraries/import/sql.php b/libraries/import/sql.php
index 4bb65d6..536df68 100644
--- a/libraries/import/sql.php
+++ b/libraries/import/sql.php
@@ -4,6 +4,7 @@
  * SQL import plugin for phpMyAdmin
  *
  * @package phpMyAdmin-Import
+ * @subpackage SQL
  */
 if (! defined('PHPMYADMIN')) {
     exit;
@@ -37,8 +38,8 @@ if (isset($plugin_list)) {
                 ),
             ),
             array(
-                'type' => 'bool', 
-                'name' => 'no_auto_value_on_zero', 
+                'type' => 'bool',
+                'name' => 'no_auto_value_on_zero',
                 'text' => __('Do not use <code>AUTO_INCREMENT</code> for zero values'),
                 'doc'       => array(
                     'manual_MySQL_Database_Administration',
@@ -234,7 +235,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
             }
             // Skip the rest
             $start_of_comment = $i;
-            // do not use PHP_EOL here instead of "\n", because the export 
+            // do not use PHP_EOL here instead of "\n", because the export
             // file might have been produced on a different system
             $i = strpos($buffer, $ch == '/' ? '*/' : "\n", $i);
             // didn't we hit end of string?
diff --git a/libraries/import/xls.php b/libraries/import/xls.php
index 6d5c0e2..f7e3d33 100644
--- a/libraries/import/xls.php
+++ b/libraries/import/xls.php
@@ -5,6 +5,7 @@
  *
  * @todo    Pretty much everything
  * @package phpMyAdmin-Import
+ * @subpackage XLS
  */
 
 if (! defined('PHPMYADMIN')) {
@@ -54,26 +55,26 @@ $col_names = array();
 
 for ($s = 0; $s < $num_sheets; ++$s) {
     $current_sheet = $objPHPExcel->getSheet($s);
-    
+
     $num_rows = $current_sheet->getHighestRow();
     $num_cols = PMA_getColumnNumberFromName($current_sheet->getHighestColumn());
-    
+
     if ($num_rows != 1 && $num_cols != 1) {
         for ($r = 1; $r <= $num_rows; ++$r) {
             for ($c = 0; $c < $num_cols; ++$c) {
                 $cell = $current_sheet->getCellByColumnAndRow($c, $r)->getCalculatedValue();
-                
+
                 if (! strcmp($cell, '')) {
                     $cell = 'NULL';
                 }
-                
+
                 $tempRow[] = $cell;
             }
-            
+
             $rows[] = $tempRow;
             $tempRow = array();
         }
-        
+
         if ($_REQUEST['xls_col_names']) {
             $col_names = array_splice($rows, 0, 1);
             $col_names = $col_names[0];
@@ -87,9 +88,9 @@ for ($s = 0; $s < $num_sheets; ++$s) {
                 $col_names[] = PMA_getColumnAlphaName($n + 1);
             }
         }
-        
+
         $tables[] = array($sheet_names[$s], $col_names, $rows);
-        
+
         $col_names = array();
         $rows = array();
     }
diff --git a/libraries/import/xlsx.php b/libraries/import/xlsx.php
index 5479623..2b5f628 100644
--- a/libraries/import/xlsx.php
+++ b/libraries/import/xlsx.php
@@ -5,6 +5,7 @@
  *
  * @todo    Pretty much everything
  * @package phpMyAdmin-Import
+ * @subpackage XLSX
  */
 
 if (! defined('PHPMYADMIN')) {
@@ -54,26 +55,26 @@ $col_names = array();
 
 for ($s = 0; $s < $num_sheets; ++$s) {
     $current_sheet = $objPHPExcel->getSheet($s);
-    
+
     $num_rows = $current_sheet->getHighestRow();
     $num_cols = PMA_getColumnNumberFromName($current_sheet->getHighestColumn());
-    
+
     if ($num_rows != 1 && $num_cols != 1) {
         for ($r = 1; $r <= $num_rows; ++$r) {
             for ($c = 0; $c < $num_cols; ++$c) {
                 $cell = $current_sheet->getCellByColumnAndRow($c, $r)->getCalculatedValue();
-                
+
                 if (! strcmp($cell, '')) {
                     $cell = 'NULL';
                 }
-                
+
                 $tempRow[] = $cell;
             }
-            
+
             $rows[] = $tempRow;
             $tempRow = array();
         }
-        
+
         if ($_REQUEST['xlsx_col_names']) {
             $col_names = array_splice($rows, 0, 1);
             $col_names = $col_names[0];
@@ -87,9 +88,9 @@ for ($s = 0; $s < $num_sheets; ++$s) {
                 $col_names[] = PMA_getColumnAlphaName($n + 1);
             }
         }
-        
+
         $tables[] = array($sheet_names[$s], $col_names, $rows);
-        
+
         $col_names = array();
         $rows = array();
     }
diff --git a/libraries/import/xml.php b/libraries/import/xml.php
index d3d17b2..8fe45d8 100644
--- a/libraries/import/xml.php
+++ b/libraries/import/xml.php
@@ -4,8 +4,8 @@
  * XML import plugin for phpMyAdmin
  *
  * @todo    Improve efficiency
- * @version 0.5-beta
  * @package phpMyAdmin-Import
+ * @subpackage XML
  */
 
 if (! defined('PHPMYADMIN')) {
@@ -141,19 +141,19 @@ if (isset($namespaces['pma'])) {
      * Get structures for all tables
      */
     $struct = $xml->children($namespaces['pma']);
-    
+
     $create = array();
-    
+
     foreach ($struct as $tier1 => $val1) {
         foreach($val1 as $tier2 => $val2) {
             /* Need to select the correct database for the creation of tables, views, triggers, etc. */
             /**
-             * @todo    Generating a USE here blocks importing of a table 
-             *          into another database. 
+             * @todo    Generating a USE here blocks importing of a table
+             *          into another database.
              */
             $attrs = $val2->attributes();
             $create[] = "USE " . PMA_backquote($attrs["name"]);
-            
+
             foreach ($val2 as $val3) {
                 /**
                  * Remove the extra cosmetic spacing
@@ -163,7 +163,7 @@ if (isset($namespaces['pma'])) {
             }
         }
     }
-    
+
     $struct_present = true;
 }
 
@@ -179,13 +179,13 @@ $data_present = false;
  */
 if (@count($xml->children())) {
     $data_present = true;
-    
+
     /**
      * Process all database content
      */
     foreach ($xml as $k1 => $v1) {
         $tbl_attr = $v1->attributes();
-        
+
         $isInTables = false;
         for ($i = 0; $i < count($tables); ++$i) {
             if (! strcmp($tables[$i][TBL_NAME], (string)$tbl_attr['name'])) {
@@ -193,11 +193,11 @@ if (@count($xml->children())) {
                 break;
             }
         }
-        
+
         if ($isInTables == false) {
             $tables[] = array((string)$tbl_attr['name']);
         }
-        
+
         foreach ($v1 as $k2 => $v2) {
             $row_attr = $v2->attributes();
             if (! array_search((string)$row_attr['name'], $tempRow))
@@ -206,17 +206,17 @@ if (@count($xml->children())) {
             }
             $tempCells[] = (string)$v2;
         }
-        
+
         $rows[] = array((string)$tbl_attr['name'], $tempRow, $tempCells);
-        
+
         $tempRow = array();
         $tempCells = array();
     }
-    
+
     unset($tempRow);
     unset($tempCells);
     unset($xml);
-    
+
     /**
      * Bring accumulated rows into the corresponding table
      */
@@ -227,17 +227,17 @@ if (@count($xml->children())) {
                 if (! isset($tables[$i][COL_NAMES])) {
                     $tables[$i][] = $rows[$j][COL_NAMES];
                 }
-                
+
                 $tables[$i][ROWS][] = $rows[$j][ROWS];
             }
         }
     }
-    
+
     unset($rows);
-    
+
     if (! $struct_present) {
         $analyses = array();
-        
+
         $len = count($tables);
         for ($i = 0; $i < $len; ++$i) {
             $analyses[] = PMA_analyzeTable($tables[$i]);
@@ -289,7 +289,7 @@ if (strlen($db)) {
     if ($db_name === NULL) {
         $db_name = 'XML_DB';
     }
-    
+
     /* Set database collation/charset */
     $options = array(
         'db_collation' => $collation,


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list