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:
authorMadhura Jayaratne <madhura.cj@gmail.com>2015-07-02 05:37:18 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-07-02 18:34:02 +0300
commit4ab83556c628e3c01f446252115f570776003afe (patch)
tree70672585d855ea651ee3085816bdca4154cf6124 /tbl_export.php
parentcc7d4c446e4ed6a9944a5c89ba37df83202d93a2 (diff)
Allow using templates created for other databases/tables
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'tbl_export.php')
-rw-r--r--tbl_export.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/tbl_export.php b/tbl_export.php
index d9eeb701b3..11ef3ea970 100644
--- a/tbl_export.php
+++ b/tbl_export.php
@@ -37,18 +37,11 @@ if (isset($_REQUEST['templateAction']) && $cfgRelation['exporttemplateswork']) {
if ('create' == $_REQUEST['templateAction']) {
$query = "INSERT INTO " . $templateTable . "("
- . " `username`, `db_name`, `table_name`,"
+ . " `username`, `export_type`,"
. " `template_name`, `template_data`"
. ") VALUES ("
. "'" . $user . "', "
- . (! empty($GLOBALS['db'])
- ? "'" . PMA_Util::sqlAddSlashes($GLOBALS['db']) . "'"
- : 'NULL'
- ) . ","
- . (! empty($GLOBALS['table'])
- ? "'" . PMA_Util::sqlAddSlashes($GLOBALS['table']) . "'"
- : 'NULL'
- ) . ","
+ . "'" . PMA_Util::sqlAddSlashes($_REQUEST['exportType']) . "', "
. "'" . PMA_Util::sqlAddSlashes($_REQUEST['templateName']) . "', "
. "'" . PMA_Util::sqlAddSlashes($_REQUEST['templateData']) . "');";
@@ -80,7 +73,7 @@ if (isset($_REQUEST['templateAction']) && $cfgRelation['exporttemplateswork']) {
if ('create' == $_REQUEST['templateAction']) {
$response->addJSON(
'data',
- PMA_getOptionsForExportTemplates($GLOBALS['db'], $GLOBALS['table'])
+ PMA_getOptionsForExportTemplates($_REQUEST['exportType'])
);
} elseif ('load' == $_REQUEST['templateAction']) {
$data = null;