diff --git a/import.php b/import.php index d5433df99e..dd1b929abb 100644 --- a/import.php +++ b/import.php @@ -569,10 +569,8 @@ if ($file_to_unlink != '') { // Reset charset back, if we did some changes if ($reset_charset) { - $GLOBALS['dbi']->query('SET CHARACTER SET utf8'); - $GLOBALS['dbi']->query( - 'SET SESSION collation_connection =\'' . $collation_connection . '\'' - ); + $GLOBALS['dbi']->query('SET CHARACTER SET ' . $GLOBALS['charset_connection']); + $GLOBALS['dbi']->setCollationConnection($collation_connection); } // Show correct message diff --git a/index.php b/index.php index 93a3785322..df4f420250 100644 --- a/index.php +++ b/index.php @@ -85,6 +85,17 @@ if (isset($_POST['set_theme'])) { header('Location: index.php' . Url::getCommonRaw()); exit(); } +// Change collation connection +if (isset($_POST['collation_connection'])) { + $GLOBALS['PMA_Config']->setUserValue( + null, + 'DefaultConnectionCollation', + $_POST['collation_connection'], + 'utf8mb4_unicode_ci' + ); + header('Location: index.php' . Url::getCommonRaw()); + exit(); +} // See FAQ 1.34 @@ -235,7 +246,7 @@ if ($server > 0 || count($cfg['Servers']) > 1 } } // end if echo '
  • '; - echo '
    ' , "\n" + echo ' ' , "\n" . Url::getHiddenInputs(null, null, 4, 'collation_connection') . '