Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Vadapalli <raghuram.4350@gmail.com>2017-07-08 16:31:36 +0300
committerRaghuram <raghuram.4350@gmail.com>2017-07-22 20:34:17 +0300
commit7fc7e5aa76cae57268d9c053b7bc6d202cbb25d1 (patch)
tree3924fa137d617503fa0cdeeaa7156bb16fb6abf4 /db_designer.php
parent8270a1c1e16bf614a5a37d7d79a9afbce649a2ec (diff)
Allow designer to show tables from other DB
Signed-off-by: Raghuram Vadapalli <raghuram.4350@gmail.com>
Diffstat (limited to 'db_designer.php')
-rw-r--r--db_designer.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/db_designer.php b/db_designer.php
index f95777c57b..12f4de6ab0 100644
--- a/db_designer.php
+++ b/db_designer.php
@@ -26,6 +26,26 @@ if (isset($_REQUEST['dialog'])) {
$html = PMA_getHtmlForSchemaExport(
$GLOBALS['db'], $_REQUEST['selected_page']
);
+ } else if ($_REQUEST['dialog'] == 'add_table') {
+ $script_display_field = PMA_getTablesInfo();
+ $required = $GLOBALS['db'] . '.' . $GLOBALS['table'];
+ $tab_column = PMA_getColumnsInfo();
+ $tables_all_keys = PMA_getAllKeys();
+ $tables_pk_or_unique_keys = PMA_getPKOrUniqueKeys();
+
+ $req_key = array_search($required, $GLOBALS['PMD']["TABLE_NAME"]);
+
+ $GLOBALS['PMD']["TABLE_NAME"] = array($GLOBALS['PMD']["TABLE_NAME"][$req_key]);
+ $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"] = array($GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$req_key]);
+ $GLOBALS['PMD']["TABLE_NAME_SMALL"] = array($GLOBALS['PMD']["TABLE_NAME_SMALL"][$req_key]);
+ $GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"] = array($GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$req_key]);
+ $GLOBALS['PMD']["TABLE_TYPE"] = array($GLOBALS['PMD_URL']["TABLE_TYPE"][$req_key]);
+ $GLOBALS['PMD_OUT']["OWNER"] = array($GLOBALS['PMD_OUT']["OWNER"][$req_key]);
+
+ $html = PMA_getDatabaseTables(
+ array(), -1, $tab_column,
+ $tables_all_keys, $tables_pk_or_unique_keys
+ );
}
if (! empty($html)) {
@@ -61,7 +81,9 @@ if (isset($_REQUEST['operation'])) {
$_REQUEST['T2'],
$_REQUEST['F2'],
$_REQUEST['on_delete'],
- $_REQUEST['on_update']
+ $_REQUEST['on_update'],
+ $_REQUEST['DB1'],
+ $_REQUEST['DB2']
);
$response->setRequestStatus($success);
$response->addJSON('message', $message);