The branch, master has been updated via 40ddb5031e4c404a53c6f08ffbe16e073305d895 (commit) from 657e492a222c9a48f77c0a36881633393556c14d (commit)
- Log ----------------------------------------------------------------- commit 40ddb5031e4c404a53c6f08ffbe16e073305d895 Author: Michal Čihař mcihar@suse.cz Date: Tue Jun 21 11:31:42 2011 +0200
Docblocks and whitespace cleanup in export modules
-----------------------------------------------------------------------
Summary of changes: libraries/export/csv.php | 2 ++ libraries/export/excel.php | 12 ++++++------ libraries/export/htmlword.php | 2 +- libraries/export/json.php | 3 +++ libraries/export/latex.php | 2 +- libraries/export/mediawiki.php | 13 ++++++------- libraries/export/php_array.php | 3 ++- libraries/export/xls.php | 38 +++++++++++++++++++------------------- libraries/export/xlsx.php | 2 +- libraries/export/xml.php | 1 - 10 files changed, 41 insertions(+), 37 deletions(-)
diff --git a/libraries/export/csv.php b/libraries/export/csv.php index 41c3cf3..050db6c 100644 --- a/libraries/export/csv.php +++ b/libraries/export/csv.php @@ -1,6 +1,8 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** + * CSV export code + * * @package phpMyAdmin-Export-CSV */ if (! defined('PHPMYADMIN')) { diff --git a/libraries/export/excel.php b/libraries/export/excel.php index 08961eb..5afbd7e 100644 --- a/libraries/export/excel.php +++ b/libraries/export/excel.php @@ -1,9 +1,9 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * Set of functions used to build CSV dumps of tables + * Set of functions used to build CSV dumps of tables for excel * - * @package phpMyAdmin-Export-CSV + * @package phpMyAdmin-Export-CSV-Excel */ if (! defined('PHPMYADMIN')) { exit; @@ -23,12 +23,12 @@ if (isset($plugin_list)) { array('type' => 'bool', 'name' => 'removeCRLF', 'text' => __('Remove carriage return/line feed characters within columns')), array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row')), array( - 'type' => 'select', - 'name' => 'edition', + 'type' => 'select', + 'name' => 'edition', 'values' => array( 'win' => 'Windows', - 'mac_excel2003' => 'Excel 2003 / Macintosh', - 'mac_excel2008' => 'Excel 2008 / Macintosh'), + 'mac_excel2003' => 'Excel 2003 / Macintosh', + 'mac_excel2008' => 'Excel 2008 / Macintosh'), 'text' => __('Excel edition:')), array('type' => 'hidden', 'name' => 'structure_or_data'), array('type' => 'end_group'), diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php index 7b54476..6598873 100644 --- a/libraries/export/htmlword.php +++ b/libraries/export/htmlword.php @@ -1,7 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * Set of functions used to build CSV dumps of tables + * Set of functions used to build HTML dumps of tables * * @package phpMyAdmin-Export-HTMLWord */ diff --git a/libraries/export/json.php b/libraries/export/json.php index 6f70dd4..d45c01b 100644 --- a/libraries/export/json.php +++ b/libraries/export/json.php @@ -1,7 +1,10 @@ <?php +/* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Set of functions used to build dumps of tables as JSON * + * @package phpMyAdmin-Export-JSON + */ */ if (! defined('PHPMYADMIN')) { exit; diff --git a/libraries/export/latex.php b/libraries/export/latex.php index 9709dc4..01e7ea1 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -1,7 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * Set of functions used to build dumps of tables + * Set of functions used to build LaTeX dumps of tables * * @package phpMyAdmin-Export-Latex */ diff --git a/libraries/export/mediawiki.php b/libraries/export/mediawiki.php index 386b63e..2363979 100644 --- a/libraries/export/mediawiki.php +++ b/libraries/export/mediawiki.php @@ -4,7 +4,6 @@ * Set of functions used to build MediaWiki dumps of tables * * @package phpMyAdmin-Export-MediaWiki - * @version $Id: mediawiki.php 12972 2009-09-14 06:21:04Z drummingds1 $ */ if (! defined('PHPMYADMIN')) { exit; @@ -112,7 +111,7 @@ function PMA_exportDBCreate($db) { function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { global $mediawiki_export_struct; global $mediawiki_export_data; - + $result = PMA_DBI_fetch_result("SHOW COLUMNS FROM `" . $db . "`.`" . $table . "`"); $row_cnt = count($result);
@@ -127,7 +126,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } $output .= "\n"; - + $output .= "|- style="background:#f9f9f9;"\n"; $output .= "! style="background:#f2f2f2" | Type\n"; for ($i = 0; $i < $row_cnt; ++$i) { @@ -137,7 +136,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } $output .= "\n"; - + $output .= "|- style="background:#f9f9f9;"\n"; $output .= "! style="background:#f2f2f2" | Null\n"; for ($i = 0; $i < $row_cnt; ++$i) { @@ -147,7 +146,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } $output .= "\n"; - + $output .= "|- style="background:#f9f9f9;"\n"; $output .= "! style="background:#f2f2f2" | Default\n"; for ($i = 0; $i < $row_cnt; ++$i) { @@ -157,7 +156,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } $output .= "\n"; - + $output .= "|- style="background:#f9f9f9;"\n"; $output .= "! style="background:#f2f2f2" | Extra\n"; for ($i = 0; $i < $row_cnt; ++$i) { @@ -167,7 +166,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } $output .= "\n"; - + $output .= "|}\n\n\n\n"; return PMA_exportOutputHandler($output); } diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php index 2c3b4e6..2687eb7 100644 --- a/libraries/export/php_array.php +++ b/libraries/export/php_array.php @@ -1,8 +1,9 @@ <?php +/* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Set of functions used to build dumps of tables as PHP Arrays * - * @version 0.2b (20090704) + * @package phpMyAdmin-Export-PHP */ if (! defined('PHPMYADMIN')) { exit; diff --git a/libraries/export/xls.php b/libraries/export/xls.php index 01e2ae4..4461c2e 100644 --- a/libraries/export/xls.php +++ b/libraries/export/xls.php @@ -1,7 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * + * Set of functions used to build dumps of tables as Excel files. * * @package phpMyAdmin-Export-XLS */ @@ -56,19 +56,19 @@ function PMA_exportComment($text) { function PMA_exportFooter() { global $workbook; global $tmp_filename; - + $tmp_filename = tempnam(realpath($GLOBALS['cfg']['TempDir']), 'pma_xls_'); - + $workbookWriter = new PHPExcel_Writer_Excel5($workbook); $workbookWriter->setTempDir(realpath($GLOBALS['cfg']['TempDir'])); $workbookWriter->save($tmp_filename); - + if (!PMA_exportOutputHandler(file_get_contents($tmp_filename))) { return false; } - + unlink($tmp_filename); - + unset($GLOBALS['workbook']); unset($GLOBALS['sheet_index']);
@@ -84,17 +84,17 @@ function PMA_exportFooter() { */ function PMA_exportHeader() { global $db; - + /* Initialize the workbook */ $GLOBALS['workbook'] = new PHPExcel(); $GLOBALS['sheet_index'] = 0; global $workbook; - + $workbook->getProperties()->setCreator('phpMyAdmin ' . PMA_VERSION); $workbook->getProperties()->setLastModifiedBy('phpMyAdmin ' . PMA_VERSION); $workbook->getProperties()->setTitle($db); $workbook->getProperties()->setSubject('phpMyAdmin ' . PMA_VERSION . ' XLS Dump'); - + return true; }
@@ -108,8 +108,8 @@ function PMA_exportHeader() { * @access public */ function PMA_exportDBHeader($db) { - - + + return true; }
@@ -155,33 +155,33 @@ function PMA_exportDBCreate($db) { function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { global $workbook; global $sheet_index; - + /** * Get the data from the database using the original query */ $result = PMA_DBI_fetch_result($sql_query); $row_cnt = count($result); - + if ($row_cnt > 0) { $col_names = array_keys($result[0]); $fields_cnt = count($result[0]); $row_offset = 1; - + /* Only one sheet is created on workbook initialization */ if ($sheet_index > 0) { $workbook->createSheet(); } - + $workbook->setActiveSheetIndex($sheet_index); $workbook->getActiveSheet()->setTitle(substr($table, 0, 31)); - + if (isset($GLOBALS['xls_columns']) && $GLOBALS['xls_columns']) { for ($i = 0; $i < $fields_cnt; ++$i) { $workbook->getActiveSheet()->setCellValueByColumnAndRow($i, $row_offset, $col_names[$i]); } $row_offset++; } - + for ($r = 0; ($r < 65536) && ($r < $row_cnt); ++$r) { for ($c = 0; $c < $fields_cnt; ++$c) { if (!isset($result[$r][$col_names[$c]]) || is_null($result[$r][$col_names[$c]])) { @@ -196,10 +196,10 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } } - + $sheet_index++; } - + return true; }
diff --git a/libraries/export/xlsx.php b/libraries/export/xlsx.php index 190cd2f..db65add 100644 --- a/libraries/export/xlsx.php +++ b/libraries/export/xlsx.php @@ -1,7 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * + * Set of functions used to build dumps of tables as Excel 2007 files. * * @package phpMyAdmin-Export-XLSX */ diff --git a/libraries/export/xml.php b/libraries/export/xml.php index e27bd2f..de2d12a 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -3,7 +3,6 @@ /** * Set of functions used to build XML dumps of tables * - * @todo * @package phpMyAdmin-Export-XML */ if (! defined('PHPMYADMIN')) {
hooks/post-receive