Introduce PMA_DRIZZLE constant
This commit is contained in:

committed by
Michal Čihař

parent
864bf00d97
commit
4c957837eb
@@ -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_MAJOR_VERSION', PMA_MYSQL_MAJOR_VERSION, true);
|
||||||
PMA_cacheSet('PMA_MYSQL_STR_VERSION', PMA_MYSQL_STR_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 */
|
/* Skip charsets for Drizzle */
|
||||||
if (PMA_MYSQL_MAJOR_VERSION < 2009) {
|
if (!PMA_DRIZZLE) {
|
||||||
if (! empty($GLOBALS['collation_connection'])) {
|
if (! empty($GLOBALS['collation_connection'])) {
|
||||||
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);
|
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);
|
PMA_DBI_query("SET collation_connection = '" . PMA_sqlAddslashes($GLOBALS['collation_connection']) . "';", $link, PMA_DBI_QUERY_STORE);
|
||||||
|
@@ -11,7 +11,7 @@ if (! defined('PHPMYADMIN')) {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if (PMA_MYSQL_MAJOR_VERSION >= 2009) {
|
if (PMA_DRIZZLE) {
|
||||||
/* There are no charsets in Drizzle */
|
/* There are no charsets in Drizzle */
|
||||||
$GLOBALS['mysql_charsets'] = array();
|
$GLOBALS['mysql_charsets'] = array();
|
||||||
$GLOBALS['mysql_charsets_descriptions'] = array('utf8' => 'UTF-8 Unicode');
|
$GLOBALS['mysql_charsets_descriptions'] = array('utf8' => 'UTF-8 Unicode');
|
||||||
|
2
main.php
2
main.php
@@ -97,7 +97,7 @@ if ($server > 0
|
|||||||
'./user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class);
|
'./user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class);
|
||||||
}
|
}
|
||||||
} // end if
|
} // end if
|
||||||
if (PMA_MYSQL_MAJOR_VERSION < 2009) {
|
if (PMA_DRIZZLE) {
|
||||||
echo ' <li id="li_select_mysql_collation">';
|
echo ' <li id="li_select_mysql_collation">';
|
||||||
echo ' <form method="post" action="index.php" target="_parent">' . "\n"
|
echo ' <form method="post" action="index.php" target="_parent">' . "\n"
|
||||||
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
|
. PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection')
|
||||||
|
Reference in New Issue
Block a user