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-02-16 07:27:35 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2015-02-16 07:27:35 +0300
commit40a82f60118ec03e7a209708d400f24ec51ed91d (patch)
treef4b04ffd3e090a2d1cd83a34067677f1e0fee45c /js/export.js
parent76c1ddaddfd1d143df9fa623b50ad3371f4949fb (diff)
bug #4769 Previously set column aliases are destroyed if returned to the same table
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/export.js')
-rw-r--r--js/export.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/js/export.js b/js/export.js
index c468d664eb..b80c3dcebf 100644
--- a/js/export.js
+++ b/js/export.js
@@ -274,12 +274,14 @@ function aliasSelectHandler(event) {
var outer = $inputWrapper[0].outerHTML;
// Replace opening tags
var regex = /<dummy_inp/gi;
- var newTag = outer.replace(regex, '<input');
- // Replace closing tags
- regex = /<\/dummy_inp/gi;
- newTag = newTag.replace(regex, '</input');
- // Assign replacement
- $inputWrapper.replaceWith(newTag);
+ if (outer.match(regex)) {
+ var newTag = outer.replace(regex, '<input');
+ // Replace closing tags
+ regex = /<\/dummy_inp/gi;
+ newTag = newTag.replace(regex, '</input');
+ // Assign replacement
+ $inputWrapper.replaceWith(newTag);
+ }
} else if (type === '_tables') {
$('.table_alias_select:visible').change();
}