Introduce PMA_DRIZZLE constant

This commit is contained in:
Piotr Przybylski
2011-04-05 15:58:11 +02:00
committed by Michal Čihař
parent 864bf00d97
commit 4c957837eb
3 changed files with 5 additions and 3 deletions

View File

@@ -985,10 +985,12 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
PMA_cacheSet('PMA_MYSQL_MAJOR_VERSION', PMA_MYSQL_MAJOR_VERSION, true);
PMA_cacheSet('PMA_MYSQL_STR_VERSION', PMA_MYSQL_STR_VERSION, true);
}
// detect Drizzle by version number (year.month.day.?patch-version)
define('PMA_DRIZZLE', PMA_MYSQL_MAJOR_VERSION >= 2009);
}
/* Skip charsets for Drizzle */
if (PMA_MYSQL_MAJOR_VERSION < 2009) {
if (!PMA_DRIZZLE) {
if (! empty($GLOBALS['collation_connection'])) {
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE);

View File

@@ -11,7 +11,7 @@ if (! defined('PHPMYADMIN')) {
/**
*
*/
if (PMA_MYSQL_MAJOR_VERSION >= 2009) {
if (PMA_DRIZZLE) {
/* There are no charsets in Drizzle */
$GLOBALS['mysql_charsets'] = array();
$GLOBALS['mysql_charsets_descriptions'] = array('utf8' => 'UTF-8 Unicode');

View File

@@ -97,7 +97,7 @@ if ($server > 0
'./user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class);
}
} // end if
if (PMA_MYSQL_MAJOR_VERSION < 2009) {
if (PMA_DRIZZLE) {
echo ' <li id="li_select_mysql_collation">';
echo ' <form method="post" action="index.php" target="_parent">' . "\n"
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')