From dbf7b5d5e04de5b215bbf2f65fa029eff75ef2c4 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 15 Mar 2021 01:55:42 +0100 Subject: [PATCH] Remove ErrorReport.wrapGlobalFunctions because it has not more effect No more PMA_ JS functions do exist now. Signed-off-by: William Desportes --- js/src/ajax.js | 5 +---- js/src/error_report.js | 20 +------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/js/src/ajax.js b/js/src/ajax.js index 17ffa68596..642ee839b0 100644 --- a/js/src/ajax.js +++ b/js/src/ajax.js @@ -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); } diff --git a/js/src/error_report.js b/js/src/error_report.js index 87e08fc491..b704474b07 100644 --- a/js/src/error_report.js +++ b/js/src/error_report.js @@ -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(); });