diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index 94d0add9c..b5784e8cd 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -244,7 +244,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
if ($do_relation && $have_rel) {
$schema_insert .= '
' . htmlspecialchars($GLOBALS['strLinksTo']) . ' | ';
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
$schema_insert .= '' . htmlspecialchars($GLOBALS['strComments']) . ' | ';
$comments = PMA_getComments($db, $table);
}
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 4ea8188d6..1f09aedf3 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -37,10 +37,8 @@ if (isset($plugin_list)) {
$plugin_list['latex']['options'][] =
array('type' => 'bool', 'name' => 'relation', 'text' => 'strRelations');
}
- if (!empty($GLOBALS['cfgRelation']['commwork']) || PMA_MYSQL_INT_VERSION >= 40100) {
- $plugin_list['latex']['options'][] =
- array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
- }
+ $plugin_list['latex']['options'][] =
+ array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
$plugin_list['latex']['options'][] =
array('type' => 'bool', 'name' => 'mime', 'text' => 'strMIME_MIMEtype');
@@ -344,7 +342,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$columns_cnt++;
$alignment .= 'l|';
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
$columns_cnt++;
$alignment .= 'l|';
}
@@ -359,7 +357,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
if ($do_relation && $have_rel) {
$header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strLinksTo'] . '}}';
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
$header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . $GLOBALS['strComments'] . '}}';
$comments = PMA_getComments($db, $table);
}
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index c4a106ab0..6fd6fa935 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -30,10 +30,8 @@ if (isset($plugin_list)) {
$plugin_list['odt']['options'][] =
array('type' => 'bool', 'name' => 'relation', 'text' => 'strRelations');
}
- if (!empty($GLOBALS['cfgRelation']['commwork']) || PMA_MYSQL_INT_VERSION >= 40100) {
- $plugin_list['odt']['options'][] =
- array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
- }
+ $plugin_list['odt']['options'][] =
+ array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
$plugin_list['odt']['options'][] =
array('type' => 'bool', 'name' => 'mime', 'text' => 'strMIME_MIMEtype');
@@ -279,7 +277,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
if ($do_relation && $have_rel) {
$columns_cnt++;
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
$columns_cnt++;
}
if ($do_mime && $cfgRelation['mimework']) {
@@ -305,7 +303,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
. '' . htmlspecialchars($GLOBALS['strLinksTo']) . ''
. '';
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
$GLOBALS['odt_buffer'] .= ''
. '' . htmlspecialchars($GLOBALS['strComments']) . ''
. '';
@@ -376,7 +374,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
. '';
}
}
- if ($do_comments && ($cfgRelation['commwork'] || PMA_MYSQL_INT_VERSION >= 40100)) {
+ if ($do_comments) {
if (isset($comments[$field_name])) {
$GLOBALS['odt_buffer'] .= ''
. '' . htmlspecialchars($comments[$field_name]) . ''
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index ab87ee10f..58c091755 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -59,10 +59,8 @@ if (isset($plugin_list)) {
} else {
$drop_clause = 'DROP TABLE';
}
- } elseif (PMA_MYSQL_INT_VERSION >= 50000) {
- $drop_clause = 'DROP TABLE / DROP VIEW';
} else {
- $drop_clause = 'DROP TABLE';
+ $drop_clause = 'DROP TABLE / DROP VIEW';
}
$plugin_list['sql']['options'][] =
array('type' => 'bool', 'name' => 'drop_table', 'text' => sprintf($GLOBALS['strAddClause'], $drop_clause));
@@ -84,10 +82,6 @@ if (isset($plugin_list)) {
$plugin_list['sql']['options'][] =
array('type' => 'bool', 'name' => 'relation', 'text' => 'strRelations');
}
- if (!empty($GLOBALS['cfgRelation']['commwork']) && PMA_MYSQL_INT_VERSION < 40100) {
- $plugin_list['sql']['options'][] =
- array('type' => 'bool', 'name' => 'comments', 'text' => 'strComments');
- }
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
$plugin_list['sql']['options'][] =
array('type' => 'bool', 'name' => 'mime', 'text' => 'strMIME_MIMEtype');
@@ -189,7 +183,7 @@ function PMA_exportHeader()
global $cfg;
global $mysql_charset_map;
- if (PMA_MYSQL_INT_VERSION >= 40100 && isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] != 'NONE') {
+ if (isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] != 'NONE') {
PMA_DBI_try_query('SET SQL_MODE="' . $GLOBALS['sql_compatibility'] . '"');
}
$head = PMA_exportComment('phpMyAdmin SQL Dump')
@@ -219,7 +213,7 @@ function PMA_exportHeader()
/* We want exported AUTO_INCREMENT fields to have still same value, do this only for recent MySQL exports */
if (!isset($GLOBALS['sql_compatibility']) || $GLOBALS['sql_compatibility'] == 'NONE') {
- $head .= $crlf . (PMA_MYSQL_INT_VERSION >= 40101 ? 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . $crlf : '');
+ $head .= $crlf . 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . $crlf;
}
if (isset($GLOBALS['sql_use_transaction'])) {
@@ -259,19 +253,17 @@ function PMA_exportDBCreate($db)
}
}
$create_query = 'CREATE DATABASE ' . (isset($GLOBALS['sql_backquotes']) ? PMA_backquote($db) : $db);
- if (PMA_MYSQL_INT_VERSION >= 40101) {
- $collation = PMA_getDbCollation($db);
- if (strpos($collation, '_')) {
- $create_query .= ' DEFAULT CHARACTER SET ' . substr($collation, 0, strpos($collation, '_')) . ' COLLATE ' . $collation;
- } else {
- $create_query .= ' DEFAULT CHARACTER SET ' . $collation;
- }
+ $collation = PMA_getDbCollation($db);
+ if (strpos($collation, '_')) {
+ $create_query .= ' DEFAULT CHARACTER SET ' . substr($collation, 0, strpos($collation, '_')) . ' COLLATE ' . $collation;
+ } else {
+ $create_query .= ' DEFAULT CHARACTER SET ' . $collation;
}
$create_query .= ';' . $crlf;
if (!PMA_exportOutputHandler($create_query)) {
return FALSE;
}
- if (isset($GLOBALS['sql_backquotes']) && PMA_MYSQL_INT_VERSION >= 40100 && isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] == 'NONE') {
+ if (isset($GLOBALS['sql_backquotes']) && isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] == 'NONE') {
return PMA_exportOutputHandler('USE ' . PMA_backquote($db) . ';' . $crlf);
}
return PMA_exportOutputHandler('USE ' . $db . ';' . $crlf);
@@ -313,7 +305,7 @@ function PMA_exportDBFooter($db)
unset($GLOBALS['sql_constraints']);
}
- if (PMA_MYSQL_INT_VERSION >= 50000 && isset($GLOBALS['sql_structure']) && isset($GLOBALS['sql_procedure_function'])) {
+ if (isset($GLOBALS['sql_structure']) && isset($GLOBALS['sql_procedure_function'])) {
$procs_funcs = '';
$procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');