[BUGFIX] Fix decrementing of AJAX requests in extension scanner 39/58539/5
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 1 Oct 2018 17:55:00 +0000 (19:55 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 1 Oct 2018 20:11:30 +0000 (22:11 +0200)
commita177e4ba23443716ec7fa321a6cb9b3d1ec648fd
tree5a4076f2233c717a3b77b9ad4dcb0905d5c6e06a
parentd6780ae03793c486b132e60bcff3f8eb46ed9fbe
[BUGFIX] Fix decrementing of AJAX requests in extension scanner

The queueing of AJAX requests in the extension scanner has some flaws
which causes the scanner to refuse another scan request.

The counter of pending requests is now always decremented, not only if
the amount of requests equals the threshold. Also, it's now checked if
there is any item in the request queue before shifting.

Instead of overriding the `success` and `error` callback, only `complete`
is now overridden, as this callback is executed on any return state.

To make the queueing part better maintainable and reusable, the code has
been moved into a separate module.

Resolves: #86523
Related: #86436
Releases: master
Change-Id: Ifa26ad7ce3bd81497c43b8606b902d467bdd1dda
Reviewed-on: https://review.typo3.org/58539
Reviewed-by: Richard Haeser <richard@maxserv.com>
Tested-by: Richard Haeser <richard@maxserv.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/install/Resources/Public/JavaScript/Modules/AjaxQueue.js [new file with mode: 0644]
typo3/sysext/install/Resources/Public/JavaScript/Modules/ExtensionScanner.js