[TASK] Improve EM performance when getting extension list from TER

When importing the extension list from TER, each version of each
extension is one database record. For each extension key the EM
calculates the newest version and sets the column 'current_version'
to 1 for the corresponsing extension record.

The old implementation issued one database query for each extension
key, resulting in about 6k queries, taking a long time to execute
(several minutes on my machine). After applying this patch the same
thing is done in three queries, speeding up the process.

Resolves: #55820
Related: #52949
Releases: 6.2
Change-Id: I55d3699a63b13e7c07af4babbf57d0d06f367027
Reviewed-on: https://review.typo3.org/27496
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Jost Baron
Tested-by: Jost Baron
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] add mtime sort test for getFilesInDir()

Add a test to check for mtime sorting capability of getFilesInDir().

Change-Id: I73082bcfd1f8d46b77a228b1ea7dabc1602d9d0a
Resolves: #55864
Releases: 6.2
Reviewed-on: https://review.typo3.org/27536
Reviewed-by: Oliver Klee
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Switch order of tests

Execute unit tests first and lint last, since
the lint is las resort anyway and unlikely to fail.

Also use a simple printf instead of a php call.

Change-Id: I7471e4ac0b217e1a58d1324bd24fc7e2f517e17e
Reviewed-on: https://review.typo3.org/27564
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Responsive sourceCollection width not usable out of the box

The dimension settings in the source collections was overriden after
calculation. Now the result will not be overriden anymore.

Resolves: #53169
Releases: 6.2
Change-Id: I34b4dbab5e99b5cf3d790f92d06d11d31b9b8140
Reviewed-on: https://review.typo3.org/25077
Reviewed-by: Ingo Schmitt
Tested-by: Ingo Schmitt
Reviewed-by: Sebastian Fischer
Tested-by: Sebastian Fischer
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Regression: intval patch broke levelmedia

Change-Id: Ib1c877c1353844dfac1955c39c864a0974bd6b78
Resolves: #55706
Releases: 6.2
Reviewed-on: https://review.typo3.org/27573
Reviewed-by: Stefano Kowalke
Reviewed-by: Jo Hasenau
Tested-by: Jo Hasenau
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] inval() -> (int) regressions in ternaries

Change-Id: I0c105134ca9de463eed7c6a3760003b8694958ce
Resolves: #55923
Releases: 6.2
Reviewed-on: https://review.typo3.org/27576
Reviewed-by: Marcin Sągol
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] RTE Image Wizard layout is inconsistent

Solution: Fix form markup inside table tag.
Remove old color class on labels.
Add rtehtmlarea skin file in order to size and position select and
checkboxes correctly in image update tab.
Position correctly window title.

Resolves: #55946
Releases: 6.2
Change-Id: I497c4a3005bd80b5b05edd64e7ebbca1dee3c0ce
Reviewed-on: https://review.typo3.org/27589
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
[BUGFIX] Wrong email list in linkvalidator task

The validator task of the linkvalidator scheduler task sets
the validated email addresses now instead of the raw user input.

Resolves: #55922
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Id1a93de455decd7a223ef271499679628892e4c4
Reviewed-on: https://review.typo3.org/27580
Reviewed-by: Online Now! GmbH
Tested-by: Online Now! GmbH
Reviewed-by: Stefan Neufeind
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] Class loader loads aliased classes twice

Check if a class already exists before requiring the file.

Change-Id: I555d259f7fb869428d20b63d2766684bb21c1a5c
Fixes: #55904
Releases: 6.2
Reviewed-on: https://review.typo3.org/27570
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[TASK] Extend functional tests with linked paths

Extends the functional tests with the possibility to link folders or
files inside the TYPO3 CMS test instance created within typo3temp.
For example you are able to link a folder inside the fixture data of
the functional tests to the fileadmin folder of the test instance.

Resolves: #55111
Releases: 6.2
Change-Id: Ic41809e7642756b7c5eb1e0d717ef3cbd6d81e1d
Reviewed-on: https://review.typo3.org/26904
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] RTE Link Wizard layout is inconsistent

Use same styling as in RTE Image wizard.
Order form fields in the same order as in TYPO3 Link Wizard. However,
the RTE has more configurable fields and more configuration options for
common fields.

Resolves: #55951
Releases: 6.2
Change-Id: Ia4cb513edb8c5fb825e8d8f54e29ed94f3bb59e3
Reviewed-on: https://review.typo3.org/27590
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
[TASK] Optimize GeneralUtility path methods

The following methods are amongst the most frequently called ones:
* getFileAbsFileName()
* validPathStr()
* isAllowedAbsPath()
* verifyFilenameAgainstDenyPattern()

They can be optimized to return early, save some variable assignments and
save some preg_match calls.

Change-Id: Id30b2f9b5a053d4267d9c24339f414821ba661ea
Resolves: #54525
Releases: 6.2
Reviewed-on: https://review.typo3.org/26505
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] isPackageActive(): test light cond. first

The return should test for:
- isset($this->runtimeActivatedPackages[$packageKey]);
before it tests for:
- parent::isPackageActive($packageKey)

Change-Id: Ia18fb601a83e717c9bbf498eaa38c4cae04ceac6
Resolves: #55749
Releases: 6.2
Reviewed-on: https://review.typo3.org/27391
Reviewed-by: Oliver Klee
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Class Loader optimisation

* Skip cache->has() calls
* Remove class alias registration on object instantiation

Resolves: #55037
Releases: 6.2
Change-Id: Ia9f8523a9d710b2703c3ee2caf2f1fa9ae6e76e9
Reviewed-on: https://review.typo3.org/26836
Reviewed-by: Markus Klein
Reviewed-by: Thomas Maroschik
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Cache non existing classes

To prevent multiple retries when loading information about non existing
classes (e.g. caused by class_exists() calls) the cache is filled with
an empty string when a non existing class is detected.

With this information the class loader can return early and does not
need to run all expensive checks for determining the class file.

Releases: 6.2
Resolves: #53962
Change-Id: I3c7e750bcce8846aaee79ac2d04527be2e31fc16
Reviewed-on: https://review.typo3.org/25679
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Selection of non image files in element browser

This patch fixes the condition that checks if an image is selectable
in the "plain" image mode in the RTE.

This fixes a regression that was introduced with #55765.

Resolves: #55939
Releases: 6.2
Change-Id: I92ed00406dcfdba6decb78e2d027f2aa6424ba1b
Reviewed-on: https://review.typo3.org/27585
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Install Tool checks for system locale

Add two new functions to check if 'systemLocale'
setting is correct and if configured 'systemLocale'
supports UTF-8 when 'UTF8filesystem' is set.

Resolves: #55721
Releases: 6.2
Change-Id: Id9edfc896a87d5025a5170690a6b7d6eb25950e6
Reviewed-on: https://review.typo3.org/27510
Reviewed-by: Markus Klein
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
[BUGFIX] Upgrade Wizard fails with exception

The package manager throws an exception "core" package
already being registered. This is caused by the signal
which instantiates the PackageManager while in
install tool the actual class is FailsafePackageManager

Solution is to not register the slot in install tool
as the failsafe package manager already takes care
of scanning for available packages.

Releases: 6.2
Resolves: #55969
Change-Id: I34b33e4ed947b532c24265e16dcc52a7aac4487e
Reviewed-on: https://review.typo3.org/27616
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] rdndt getClassSchema() in thawProperties(

getClassSchema() is being called within a foreach loop while the
$className never changes for that call.

Change-Id: I699a1a0ab34d784b7463244f218f4e8a0c0b7a0c
Resolves: #55991
Releases: 6.2
Reviewed-on: https://review.typo3.org/27633
Reviewed-by: Marcin Sągol
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Streamline DataHandler functional tests

* load modified typo3conf/extTables.php
* add label for copied records
* add label for localized records
* streamline test assertion of IRRE reference test

Resolves: #56029
Releases: 6.2
Change-Id: I4b60200c568aa17e8d51cae95567fe045bff62c7
Reviewed-on: https://review.typo3.org/27648
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader