mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 01:24:17 +02:00
No AJAX in drop table, drop database and logout
This commit is contained in:
@@ -399,3 +399,16 @@ function schemaMouseup(ev) {
|
||||
cookie('adminer_schema=' + encodeURIComponent(s.substr(1)), 30, '; path="' + location.pathname + location.search + '"');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** Stop event propagation
|
||||
* @param Event
|
||||
*/
|
||||
function eventStop(event) {
|
||||
if (event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
|
@@ -383,7 +383,7 @@ function bodyClick(event, db) {
|
||||
var match = /&db=([^&]*)/.exec(el.href);
|
||||
return !(db == (match ? match[1] : '') && ajaxMain(el.href, '', event));
|
||||
}
|
||||
if (/^input$/i.test(el.tagName) && /submit|image/.test(el.type) && !/&(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)=/.test(location.href)) {
|
||||
return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + '=1' : ''));
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user