From 59e71a06c0e224d91a6e83ce5e6de2fde82a03b2 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Thu, 14 Jul 2011 00:40:15 +0200 Subject: [PATCH] Quick fixes for XML export --- libraries/export/xml.php | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/libraries/export/xml.php b/libraries/export/xml.php index 85bab5f77f..50614b746a 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -28,16 +28,20 @@ if (isset($plugin_list)) { /* Export structure */ $plugin_list['xml']['options'][] = array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options (all are recommended)')); - $plugin_list['xml']['options'][] = - array('type' => 'bool', 'name' => 'export_functions', 'text' => __('Functions')); - $plugin_list['xml']['options'][] = - array('type' => 'bool', 'name' => 'export_procedures', 'text' => __('Procedures')); + if (!PMA_DRIZZLE) { + $plugin_list['xml']['options'][] = + array('type' => 'bool', 'name' => 'export_functions', 'text' => __('Functions')); + $plugin_list['xml']['options'][] = + array('type' => 'bool', 'name' => 'export_procedures', 'text' => __('Procedures')); + } $plugin_list['xml']['options'][] = array('type' => 'bool', 'name' => 'export_tables', 'text' => __('Tables')); - $plugin_list['xml']['options'][] = - array('type' => 'bool', 'name' => 'export_triggers', 'text' => __('Triggers')); - $plugin_list['xml']['options'][] = - array('type' => 'bool', 'name' => 'export_views', 'text' => __('Views')); + if (!PMA_DRIZZLE) { + $plugin_list['xml']['options'][] = + array('type' => 'bool', 'name' => 'export_triggers', 'text' => __('Triggers')); + $plugin_list['xml']['options'][] = + array('type' => 'bool', 'name' => 'export_views', 'text' => __('Views')); + } $plugin_list['xml']['options'][] = array('type' => 'end_group'); /* Data */ @@ -105,7 +109,16 @@ function PMA_exportHeader() { $head .= '' . $crlf; if ($export_struct) { - $result = PMA_DBI_fetch_result('SELECT `DEFAULT_CHARACTER_SET_NAME`, `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME` = \''.$db.'\' LIMIT 1'); + if (PMA_DRIZZLE) { + $result = PMA_DBI_fetch_result(" + SELECT + 'utf8' AS DEFAULT_CHARACTER_SET_NAME, + DEFAULT_COLLATION_NAME + FROM data_dictionary.SCHEMAS + WHERE SCHEMA_NAME = '" . PMA_sqlAddSlashes($db) . "'"); + } else { + $result = PMA_DBI_fetch_result('SELECT `DEFAULT_CHARACTER_SET_NAME`, `DEFAULT_COLLATION_NAME` FROM `information_schema`.`SCHEMATA` WHERE `SCHEMA_NAME` = \''.$db.'\' LIMIT 1'); + } $db_collation = $result[0]['DEFAULT_COLLATION_NAME']; $db_charset = $result[0]['DEFAULT_CHARACTER_SET_NAME']; -- 2.11.4.GIT