rfe #1612724 [export] add option to export without comments
This commit is contained in:
@@ -19,6 +19,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
AllowEmptyRoot
|
||||
+ rfe #1778908 [auth] arbitrary server auth can now also accept port
|
||||
- patch #2089240 [export] handle correctly switching SQL modes
|
||||
+ rfe #1612724 [export] add option to export without comments
|
||||
|
||||
3.0.0.0 (not yet released)
|
||||
+ [export] properly handle line breaks for YAML, thanks to Dan Barry -
|
||||
|
@@ -1366,6 +1366,13 @@ $cfg['Export']['sql_data'] = true;
|
||||
*/
|
||||
$cfg['Export']['sql_compatibility'] = 'NONE';
|
||||
|
||||
/**
|
||||
* Whether to include comments in SQL export.
|
||||
*
|
||||
* @global string $cfg['Export']['sql_compatibility']
|
||||
*/
|
||||
$cfg['Export']['sql_include_comments'] = true;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
|
@@ -26,6 +26,7 @@ if (isset($plugin_list)) {
|
||||
'mime_type' => 'text/x-sql',
|
||||
'options' => array(
|
||||
array('type' => 'text', 'name' => 'header_comment', 'text' => 'strAddHeaderComment'),
|
||||
array('type' => 'bool', 'name' => 'include_comments', 'text' => 'strComments'),
|
||||
array('type' => 'bool', 'name' => 'use_transaction', 'text' => 'strEncloseInTransaction'),
|
||||
array('type' => 'bool', 'name' => 'disable_fk', 'text' => 'strDisableForeignChecks'),
|
||||
),
|
||||
@@ -137,8 +138,12 @@ if (! isset($sql_backquotes)) {
|
||||
*/
|
||||
function PMA_exportComment($text = '')
|
||||
{
|
||||
// see http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html
|
||||
return '--' . (empty($text) ? '' : ' ') . $text . $GLOBALS['crlf'];
|
||||
if ($GLOBALS['sql_include_comments']) {
|
||||
// see http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html
|
||||
return '--' . (empty($text) ? '' : ' ') . $text . $GLOBALS['crlf'];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user