From: Jakub Vrana Date: Mon, 6 Dec 2010 00:12:55 +0000 (+0100) Subject: No AJAX for non-HTML output X-Git-Tag: v3.2.0~103 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=5f9282f1325299b65a88289ea984c684d9091103;p=adminer.git No AJAX for non-HTML output --- diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 7bcc235c..197c0581 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -384,12 +384,12 @@ function bodyClick(event, db, ns) { if (/^a$/i.test(el.parentNode.tagName)) { el = el.parentNode; } - if (/^a$/i.test(el.tagName) && !/^https?:|#/i.test(el.getAttribute('href')) && /[&?]username=/.exec(el.href)) { + if (/^a$/i.test(el.tagName) && !/^https?:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.exec(el.href)) { var match = /&db=([^&]*)/.exec(el.href); var match2 = /&ns=([^&]*)/.exec(el.href); return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxMain(el.href, '', event)); } - if (/^input$/i.test(el.tagName) && /submit|image/.test(el.type) && el.name != 'logout' && !/&(database|scheme|create|view|sql|user)=/.test(location.href)) { + if (/^input$/i.test(el.tagName) && /submit|image/.test(el.type) && el.name != 'logout' && !/&(database|scheme|create|view|sql|user|dump)=/.test(location.href)) { return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + '=1' : '')); } return true;