From a80dfa751a99c9e5c346603df0f451c9d1034d8d Mon Sep 17 00:00:00 2001 From: Thilina Buddika Date: Mon, 23 Jul 2012 05:16:28 +0530 Subject: [PATCH] PMA_getHtmlForCopyDatabase funtion implementation and remove addHtml usgae for testing, --- db_operations.php | 78 ++------------------------------ libraries/db_operations.lib.php | 80 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 74 deletions(-) diff --git a/db_operations.php b/db_operations.php index 2683a9c864..50f9160970 100644 --- a/db_operations.php +++ b/db_operations.php @@ -416,7 +416,7 @@ if (!$is_information_schema) { /** * database comment */ - $response->addHTML(PMA_getHtmlForDatabaseComment()); + echo PMA_getHtmlForDatabaseComment(); } ?>
@@ -427,7 +427,7 @@ if (!$is_information_schema) { * rename database */ if ($db != 'mysql') { - $response->addHTML(PMA_getHtmlForRenameDatabase()); + echo PMA_getHtmlForRenameDatabase(); } // Drop link if allowed @@ -437,82 +437,12 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_information_schema && (PMA_DRIZZLE || $db != 'mysql') ) { - $response->addHTML(PMA_getHtmlForDropDatabaseLink()); + echo PMA_getHtmlForDropDatabaseLink(); } /** * Copy database */ -?> -
-
method="post" action="db_operations.php" - onsubmit="return emptyFormElements(this, 'newname')"> - ' . "\n"; - } - echo '' . "\n"; - echo PMA_generate_common_hidden_inputs($db); - ?> -
- - getImage('b_edit.png'); - } - echo __('Copy database to') . ':'; - $drop_clause = 'DROP TABLE / DROP VIEW'; - ?> - -
- __('Structure only'), - 'data' => __('Structure and data'), - 'dataonly' => __('Data only')); - echo $common_functions->getRadioFields( - 'what', $choices, 'data', true - ); - unset($choices); -?> - -
- -
- -
- -
- - - /> - -
-
- -
-
-
- __('Structure only'), + 'data' => __('Structure and data'), + 'dataonly' => __('Data only') + ); + + if (isset($_COOKIE) + && isset($_COOKIE['pma_switch_to_new']) + && $_COOKIE['pma_switch_to_new'] == 'true' + ) { + $pma_switch_to_new = 'true'; + } + + $html_output = '
'; + $html_output .= '
'; + + if (isset($_REQUEST['db_collation'])) { + $html_output .= '' . "\n"; + } + $html_output .= '' . "\n" + . PMA_generate_common_hidden_inputs($GLOBALS['db']); + $html_output .= '
' + . ''; + + if ($GLOBALS['cfg']['PropertiesIconic']) { + $html_output .= PMA_CommonFunctions::getInstance()->getImage('b_edit.png'); + } + $html_output .= __('Copy database to') . ':' + . '' + . '
' + . PMA_CommonFunctions::getInstance()->getRadioFields( + 'what', $choices, 'data', true + ); + $html_output .= ''; + $html_output .= '
'; + $html_output .= ''; + $html_output .= '
'; + $html_output .= ''; + $html_output .= '
'; + $html_output .= ''; + $html_output .= '
'; + $html_output .= ''; + $html_output .= '' + . '
'; + $html_output .= '
' + . '' + . '
' + . '
' + . '
'; + + return $html_output; +} ?>