The branch, master has been updated via ced22c9c22cb9cb51b44e0a0c25f5f3ffb645423 (commit) via f14a4e567f457582b4fda51d3eed1aa1ba9ca82d (commit) from 7802be3c48de27f14f4bc8e6acf331c3aff1951e (commit)
- Log ----------------------------------------------------------------- commit ced22c9c22cb9cb51b44e0a0c25f5f3ffb645423 Author: Piotr Przybylski piotrprz@gmail.com Date: Tue Jul 12 17:48:03 2011 +0200
Remove unused function from most export plugins: PMA_exportComment It's used only locally in SQL export
commit f14a4e567f457582b4fda51d3eed1aa1ba9ca82d Author: Piotr Przybylski piotrprz@gmail.com Date: Tue Jul 12 17:43:45 2011 +0200
Unify comments for export plugins
-----------------------------------------------------------------------
Summary of changes: export.php | 5 +- libraries/export/codegen.php | 34 +++-------- libraries/export/csv.php | 33 +++-------- libraries/export/htmlword.php | 58 +++++++++++--------- libraries/export/json.php | 37 +++--------- libraries/export/latex.php | 63 +++++++++------------ libraries/export/mediawiki.php | 33 +++-------- libraries/export/ods.php | 35 +++-------- libraries/export/odt.php | 67 +++++++++------------- libraries/export/pdf.php | 35 +++--------- libraries/export/php_array.php | 37 +++--------- libraries/export/sql.php | 121 +++++++++++++++++----------------------- libraries/export/texytext.php | 58 +++++++++++--------- libraries/export/xls.php | 33 +++-------- libraries/export/xlsx.php | 33 +++-------- libraries/export/xml.php | 36 +++--------- libraries/export/yaml.php | 35 +++--------- 17 files changed, 274 insertions(+), 479 deletions(-)
diff --git a/export.php b/export.php index 9471ba0..6137b96 100644 --- a/export.php +++ b/export.php @@ -125,8 +125,7 @@ $time_start = time(); * Output handler for all exports, if needed buffering, it stores data into * $dump_buffer, otherwise it prints thems out. * - * @param string the insert statement - * + * @param string $line the insert statement * @return bool Whether output suceeded */ function PMA_exportOutputHandler($line) @@ -512,7 +511,7 @@ if ($export_type == 'server') { }
if (function_exists('PMA_exportRoutines') && strpos($GLOBALS['sql_structure_or_data'], 'structure') !== false && isset($GLOBALS['sql_procedure_function'])) { - PMA_exportRoutines($db); + PMA_exportRoutines($db); }
$i = 0; diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php index bb4510a..d60785c 100644 --- a/libraries/export/codegen.php +++ b/libraries/export/codegen.php @@ -47,18 +47,6 @@ if (isset($plugin_list)) { */
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) -{ - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -85,8 +73,7 @@ function PMA_exportHeader() /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -99,8 +86,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -111,10 +97,9 @@ function PMA_exportDBFooter($db) }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -127,12 +112,11 @@ function PMA_exportDBCreate($db) /** * Outputs the content of a table in NHibernate format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/csv.php b/libraries/export/csv.php index 62b1537..0240e9b 100644 --- a/libraries/export/csv.php +++ b/libraries/export/csv.php @@ -36,17 +36,6 @@ if (isset($plugin_list)) { } else {
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -107,8 +96,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -120,8 +108,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -131,10 +118,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -146,12 +132,11 @@ function PMA_exportDBCreate($db) { /** * Outputs the content of a table in CSV format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php index af5af76..c840e93 100644 --- a/libraries/export/htmlword.php +++ b/libraries/export/htmlword.php @@ -35,17 +35,6 @@ if (isset($plugin_list)) { } else {
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -80,8 +69,7 @@ xmlns="http://www.w3.org/TR/REC-html40%22%3E /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -93,8 +81,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -104,10 +91,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -117,14 +103,13 @@ function PMA_exportDBCreate($db) { }
/** - * Outputs the content of a table in CSV format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in HTML (Microsoft Word) format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public @@ -182,7 +167,28 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) return true; }
-function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy) +/** + * Outputs table's structure + * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $do_relation whether to include relation comments + * @param bool $do_comments whether to include the pmadb-style column comments + * as comments in the structure; this is deprecated + * but the parameter is left here because export.php + * calls PMA_exportStructure() also for other export + * types which use this parameter + * @param bool $do_mime whether to include mime comments + * @param bool $dates whether to include creation/update/check dates + * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in' + * @param string $export_type 'server', 'database', 'table' + * @return bool Whether it suceeded + * + * @access public + */ +function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type) { global $cfgRelation;
diff --git a/libraries/export/json.php b/libraries/export/json.php index 9c836e1..86e2e89 100644 --- a/libraries/export/json.php +++ b/libraries/export/json.php @@ -35,19 +35,6 @@ if (isset($plugin_list)) { */
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) -{ - PMA_exportOutputHandler('/* ' . $text . ' */' . $GLOBALS['crlf']); - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -80,8 +67,7 @@ function PMA_exportHeader() /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -95,8 +81,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -107,10 +92,9 @@ function PMA_exportDBFooter($db) }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -121,14 +105,13 @@ function PMA_exportDBCreate($db) }
/** - * Outputs the content of a table in YAML format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in JSON format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/latex.php b/libraries/export/latex.php index 565c29c..ee8f3a2 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -101,17 +101,6 @@ function PMA_texEscape($string) { }
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return PMA_exportOutputHandler('% ' . $text . $GLOBALS['crlf']); -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -151,8 +140,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -168,8 +156,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -179,10 +166,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -194,12 +180,11 @@ function PMA_exportDBCreate($db) { /** * Outputs the content of a table in LaTeX table/sideways table environment * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public @@ -290,23 +275,27 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } // end getTableLaTeX
/** - * Returns $table's structure as LaTeX - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param boolean whether to include relation comments - * @param boolean whether to include column comments - * @param boolean whether to include mime comments - * @param string future feature: support view dependencies + * Outputs table's structure * - * @return bool Whether it suceeded + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $do_relation whether to include relation comments + * @param bool $do_comments whether to include the pmadb-style column comments + * as comments in the structure; this is deprecated + * but the parameter is left here because export.php + * calls PMA_exportStructure() also for other export + * types which use this parameter + * @param bool $do_mime whether to include mime comments + * @param bool $dates whether to include creation/update/check dates + * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in' + * @param string $export_type 'server', 'database', 'table' + * @return bool Whether it suceeded * * @access public */ - // @@@ Table structure -function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy) +function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type) { global $cfgRelation;
diff --git a/libraries/export/mediawiki.php b/libraries/export/mediawiki.php index 538c31c..76c8b2a 100644 --- a/libraries/export/mediawiki.php +++ b/libraries/export/mediawiki.php @@ -25,17 +25,6 @@ if (isset($plugin_list)) { } else {
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -60,8 +49,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -73,8 +61,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -84,10 +71,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -99,12 +85,11 @@ function PMA_exportDBCreate($db) { /** * Outputs the content of a table in MediaWiki format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/ods.php b/libraries/export/ods.php index 699aa0f..9d9ff13 100644 --- a/libraries/export/ods.php +++ b/libraries/export/ods.php @@ -34,17 +34,6 @@ $GLOBALS['ods_buffer'] = ''; require_once './libraries/opendocument.lib.php';
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -113,8 +102,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -126,8 +114,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -137,10 +124,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -150,14 +136,13 @@ function PMA_exportDBCreate($db) { }
/** - * Outputs the content of a table in CSV format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in ODS format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/odt.php b/libraries/export/odt.php index d3c42de..b640ca3 100644 --- a/libraries/export/odt.php +++ b/libraries/export/odt.php @@ -66,17 +66,6 @@ $GLOBALS['odt_buffer'] = ''; require_once './libraries/opendocument.lib.php';
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -111,8 +100,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -125,8 +113,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -136,10 +123,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -149,14 +135,13 @@ function PMA_exportDBCreate($db) { }
/** - * Outputs the content of a table in CSV format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in ODT format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public @@ -222,23 +207,27 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { }
/** - * Returns $table's structure as Open Document Text - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param boolean whether to include relation comments - * @param boolean whether to include column comments - * @param boolean whether to include mime comments - * @param string future feature: support view dependencies + * Outputs table's structure * - * @return bool Whether it suceeded + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $do_relation whether to include relation comments + * @param bool $do_comments whether to include the pmadb-style column comments + * as comments in the structure; this is deprecated + * but the parameter is left here because export.php + * calls PMA_exportStructure() also for other export + * types which use this parameter + * @param bool $do_mime whether to include mime comments + * @param bool $dates whether to include creation/update/check dates + * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in' + * @param string $export_type 'server', 'database', 'table' + * @return bool Whether it suceeded * * @access public */ - // @@@ Table structure -function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy) +function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type) { global $cfgRelation;
diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php index e864454..bb89fda 100644 --- a/libraries/export/pdf.php +++ b/libraries/export/pdf.php @@ -359,18 +359,6 @@ class PMA_PDF extends TCPDF $pdf = new PMA_PDF('L', 'pt', 'A3');
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) -{ - return true; -} - -/** * Finalize the pdf. * * @return bool Whether it suceeded @@ -420,8 +408,7 @@ function PMA_exportHeader() /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -434,8 +421,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -446,10 +432,9 @@ function PMA_exportDBFooter($db) }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -462,13 +447,11 @@ function PMA_exportDBCreate($db) /** * Outputs the content of a table in PDF format * - * @todo user-defined page orientation, paper size - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php index 66a0aa6..1996e6f 100644 --- a/libraries/export/php_array.php +++ b/libraries/export/php_array.php @@ -35,19 +35,6 @@ if (isset($plugin_list)) { */
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) -{ - PMA_exportOutputHandler('// ' . $text . $GLOBALS['crlf']); - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -81,8 +68,7 @@ function PMA_exportHeader() /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -96,8 +82,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -108,10 +93,9 @@ function PMA_exportDBFooter($db) }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -122,14 +106,13 @@ function PMA_exportDBCreate($db) }
/** - * Outputs the content of a table in YAML format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table as a fragment of PHP code * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/sql.php b/libraries/export/sql.php index 3b0d968..e56d8a8 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -297,9 +297,10 @@ if (! isset($sql_backquotes)) { /** * Exports routines (procedures and functions) * - * @param string $db + * @param string $db + * @return bool Whether it suceeded * - * @return bool Whether it suceeded + * @access public */ function PMA_exportRoutines($db) { global $crlf; @@ -357,9 +358,10 @@ function PMA_exportRoutines($db) { /** * Possibly outputs comment * - * @param string Text of comment - * + * @param string $text Text of comment * @return string The formatted comment + * + * @access private */ function PMA_exportComment($text = '') { @@ -375,10 +377,11 @@ function PMA_exportComment($text = '') * Possibly outputs CRLF * * @return string $crlf or nothing + * + * @access private */ function PMA_possibleCRLF() { - if (isset($GLOBALS['sql_include_comments']) && $GLOBALS['sql_include_comments']) { return $GLOBALS['crlf']; } else { @@ -518,10 +521,9 @@ function PMA_exportHeader() }
/** - * Outputs CREATE DATABASE database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -557,8 +559,7 @@ function PMA_exportDBCreate($db) /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -574,8 +575,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -626,15 +626,13 @@ function PMA_exportDBFooter($db) return $result; }
- /** * Returns a stand-in CREATE definition to resolve view dependencies * - * @param string the database name - * @param string the view name - * @param string the end of line sequence - * - * @return string resulting definition + * @param string $db the database name + * @param string $view the view name + * @param string $crlf the end of line sequence + * @return string resulting definition * * @access public */ @@ -662,20 +660,15 @@ function PMA_getTableDefStandIn($db, $view, $crlf) { /** * Returns $table's CREATE definition * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param boolean whether to include creation/update/check dates - * @param boolean whether to add semicolon and end-of-line at the end - * @param boolean whether we're handling view - * + * @param string $db the database name + * @param string $table the table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $show_dates whether to include creation/update/check dates + * @param bool $add_semicolon whether to add semicolon and end-of-line at the end + * @param bool $view whether we're handling a view * @return string resulting schema * - * @global boolean whether to add 'drop' statements or not - * @global boolean whether to use backquotes to allow the use of special - * characters in database, table and fields names or not - * * @access public */ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $add_semicolon = true, $view = false) @@ -869,21 +862,19 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a return $schema_create . ($add_semicolon ? ';' . $crlf : ''); } // end of the 'PMA_getTableDef()' function
- /** * Returns $table's comments, relations etc. * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param boolean whether to include relation comments - * @param boolean whether to include mime comments - * + * @param string $db database name + * @param string $table table name + * @param string $crlf end of line sequence + * @param bool $do_relation whether to include relation comments + * @param bool $do_mime whether to include mime comments * @return string resulting comments * - * @access public + * @access private */ -function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mime = false) +function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mime = false) { global $cfgRelation; global $sql_backquotes; @@ -943,21 +934,21 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mim /** * Outputs table's structure * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param boolean whether to include relation comments - * @param boolean whether to include the pmadb-style column comments - * as comments in the structure; this is deprecated - * but the parameter is left here because export.php - * calls PMA_exportStructure() also for other export - * types which use this parameter - * @param boolean whether to include mime comments - * @param string 'stand_in', 'create_table', 'create_view' - * @param string 'server', 'database', 'table' - * - * @return bool Whether it suceeded + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $relation whether to include relation comments + * @param bool $comments whether to include the pmadb-style column comments + * as comments in the structure; this is deprecated + * but the parameter is left here because export.php + * calls PMA_exportStructure() also for other export + * types which use this parameter + * @param bool $mime whether to include mime comments + * @param bool $dates whether to include creation/update/check dates + * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in' + * @param string $export_type 'server', 'database', 'table' + * @return bool Whether it suceeded * * @access public */ @@ -1019,26 +1010,16 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = false, }
/** - * Dispatches between the versions of 'getTableContent' to use depending - * on the php version - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in SQL format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * - * @global boolean whether to use backquotes to allow the use of special - * characters in database, table and fields names or not - * @global integer the number of records - * @global integer the current record position - * * @access public - * - * @see PMA_getTableContentFast(), PMA_getTableContentOld() - * */ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { diff --git a/libraries/export/texytext.php b/libraries/export/texytext.php index 2b290f1..ceffe4d 100644 --- a/libraries/export/texytext.php +++ b/libraries/export/texytext.php @@ -33,17 +33,6 @@ if (isset($plugin_list)) { } else {
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -68,8 +57,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -81,8 +69,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -92,10 +79,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -105,14 +91,13 @@ function PMA_exportDBCreate($db) { }
/** - * Outputs the content of a table in CSV format - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in Texy format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public @@ -164,7 +149,28 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) return true; }
-function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy) +/** + * Outputs table's structure + * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param bool $do_relation whether to include relation comments + * @param bool $do_comments whether to include the pmadb-style column comments + * as comments in the structure; this is deprecated + * but the parameter is left here because export.php + * calls PMA_exportStructure() also for other export + * types which use this parameter + * @param bool $do_mime whether to include mime comments + * @param bool $dates whether to include creation/update/check dates + * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in' + * @param string $export_type 'server', 'database', 'table' + * @return bool Whether it suceeded + * + * @access public + */ +function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type) { global $cfgRelation;
diff --git a/libraries/export/xls.php b/libraries/export/xls.php index 2a1f219..6116e2a 100644 --- a/libraries/export/xls.php +++ b/libraries/export/xls.php @@ -37,17 +37,6 @@ require_once './libraries/PHPExcel/PHPExcel.php'; require_once './libraries/PHPExcel/PHPExcel/Writer/Excel5.php';
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -102,8 +91,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -117,8 +105,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -128,10 +115,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -143,12 +129,11 @@ function PMA_exportDBCreate($db) { /** * Outputs the content of a table in XLS format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/xlsx.php b/libraries/export/xlsx.php index 487c2df..758d98d 100644 --- a/libraries/export/xlsx.php +++ b/libraries/export/xlsx.php @@ -37,17 +37,6 @@ require_once './libraries/PHPExcel/PHPExcel.php'; require_once './libraries/PHPExcel/PHPExcel/Writer/Excel2007.php';
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -101,8 +90,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -116,8 +104,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -127,10 +114,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -142,12 +128,11 @@ function PMA_exportDBCreate($db) { /** * Outputs the content of a table in XLSX format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/xml.php b/libraries/export/xml.php index ba1e4fa..ec9fcfa 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -49,17 +49,6 @@ if (isset($plugin_list)) { } else {
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) { - return PMA_exportOutputHandler('<!-- ' . $text . ' -->' . $GLOBALS['crlf']); -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -243,8 +232,7 @@ function PMA_exportHeader() { /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -270,8 +258,7 @@ function PMA_exportDBHeader($db) { /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -290,10 +277,9 @@ function PMA_exportDBFooter($db) { }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -302,16 +288,14 @@ function PMA_exportDBCreate($db) { return true; }
- /** - * Outputs the content of a table - * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data + * Outputs the content of a table in XML format * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public diff --git a/libraries/export/yaml.php b/libraries/export/yaml.php index 8c3fad0..017cae6 100644 --- a/libraries/export/yaml.php +++ b/libraries/export/yaml.php @@ -36,19 +36,6 @@ if (isset($plugin_list)) { */
/** - * Outputs comment - * - * @param string Text of comment - * - * @return bool Whether it suceeded - */ -function PMA_exportComment($text) -{ - PMA_exportOutputHandler('# ' . $text . $GLOBALS['crlf']); - return true; -} - -/** * Outputs export footer * * @return bool Whether it suceeded @@ -77,8 +64,7 @@ function PMA_exportHeader() /** * Outputs database header * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -91,8 +77,7 @@ function PMA_exportDBHeader($db) /** * Outputs database footer * - * @param string Database name - * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -103,10 +88,9 @@ function PMA_exportDBFooter($db) }
/** - * Outputs create database database - * - * @param string Database name + * Outputs CREATE DATABASE statement * + * @param string $db Database name * @return bool Whether it suceeded * * @access public @@ -119,12 +103,11 @@ function PMA_exportDBCreate($db) /** * Outputs the content of a table in YAML format * - * @param string the database name - * @param string the table name - * @param string the end of line sequence - * @param string the url to go back in case of error - * @param string SQL query for obtaining data - * + * @param string $db database name + * @param string $table table name + * @param string $crlf the end of line sequence + * @param string $error_url the url to go back in case of error + * @param string $sql_query SQL query for obtaining data * @return bool Whether it suceeded * * @access public
hooks/post-receive