Remove ErrorReport.wrapGlobalFunctions because it has not more effect

No more PMA_ JS functions do exist now.
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-03-15 01:55:42 +01:00
parent 74b4e7ad82
commit dbf7b5d5e0
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 2 additions and 23 deletions

View File

@ -27,7 +27,7 @@ var AJAX = {
// eslint-disable-next-line valid-jsdoc
/**
* @var {Function} callback Callback to execute after a successful request
* Used by PMA_commonFunctions from common.js
* Used by CommonActions from common.js
*/
callback: function () {},
/**
@ -711,9 +711,6 @@ var AJAX = {
* @return {void}
*/
done: function (script, callback) {
if (typeof ErrorReport !== 'undefined') {
ErrorReport.wrapGlobalFunctions();
}
if ($.inArray(script, this.scriptsToBeFired)) {
AJAX.fireOnload(script);
}

View File

@ -227,21 +227,6 @@ var ErrorReport = {
}
return reportData;
},
/**
* Wraps all global functions that start with PMA_
*
* @return {void}
*/
wrapGlobalFunctions: function () {
for (var key in window) {
if (key.indexOf('PMA_') === 0) {
var global = window[key];
if (typeof(global) === 'function') {
window[key] = ErrorReport.wrapFunction(global);
}
}
}
},
/**
* Wraps given function in error reporting code and returns wrapped function
*
@ -297,13 +282,11 @@ var ErrorReport = {
};
},
/**
* Wraps all global functions that start with PMA_
* also automatically wraps the callback in AJAX.registerOnload
* Wraps the callback in AJAX.registerOnload automatically
*
* @return {void}
*/
setUpErrorReporting: function () {
ErrorReport.wrapGlobalFunctions();
ErrorReport.wrapAjaxOnloadCallback();
ErrorReport.wrapJqueryOnCallback();
}
@ -312,5 +295,4 @@ var ErrorReport = {
AJAX.registerOnload('error_report.js', function () {
TraceKit.report.subscribe(ErrorReport.errorHandler);
ErrorReport.setUpErrorReporting();
ErrorReport.wrapGlobalFunctions();
});