[BUGFIX] Fix page.headerData + USER_INT

INT scripts placed in page.headerData.XX were
not replaced any more after introducing USER_INT
capabilities of the pageRenderer in #22273

This change reprocesses _INT placeholders after
the pageRenderer replacements have been done.

Resolves: #44825
Releases: 6.0, 6.1, 6.2
Change-Id: If11b692ed75120dbf122d95ca497b5e382fdf349
Reviewed-on: https://review.typo3.org/23982
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Fix broken Unit-test for #44825

Change-Id: Id1ecce2b4fe789b655f63cd8b5f78ab20eadfbd5
Resolves: #52201
Related: #44825
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24013
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Correct storage selection (common prefixes)

If there is a local storage "uploads/test/" and a requested file
is in "uploads/other/file.txt", the storage matching will not
consider this storage for this file anymore, although they share a
common prefix, but will use a correct matching storage (e.g. 0).

Releases: 6.2, 6.1, 6.0
Resolves: #52173
Change-Id: Id14ffd6620554c086b6e77dca285ade8dee39ab2
Reviewed-on: https://review.typo3.org/23994
Reviewed-by: Stefan Neufeind
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Remove duplicate exception code

Exception code "1314354065" is used twice: once in the abstract
Resource repository and the other one in the File Collection repository.
Since exception code must be unique, the patch simply renames one
occurrence.

Change-Id: I41474db5de7e8f575275d57e9585252857334ee2
Releases: 6.0, 6.1, 6.2
Resolves: #52243
Reviewed-on: https://review.typo3.org/24038
Reviewed-by: Kilian Hann
Tested-by: Kilian Hann
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-on: https://review.typo3.org/24047
[BUGFIX] Increase performance of exports for caches

Exporting arrays for caches is now done with var_export().

Resolves: #51116
Releases: 6.2, 6.1, 6.0
Change-Id: I7519fd9c2ab21cc22a3f4e092b611c6bca58c30f
Reviewed-on: https://review.typo3.org/24052
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] EM does not link to docs.typo3.org

docs.typo3.org is new official documentation platform supporting both
OpenOffice and Sphinx manuals.

Fixes: #52226
Releases: 6.2, 6.1, 6.0
Change-Id: Ie5f27bf15f5174a6e1bb53bedd575ceeb362add8
Reviewed-on: https://review.typo3.org/24017
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-on: https://review.typo3.org/24054
[TASK] Use SimpleFileBackend for t3lib_l10n cache

The language cache by default uses the FileBackend to store its data.
Language cache entries need to be deleted only if new extensions are
loaded and if new language overlays are fetched. They do not need
tagging and can have an unlimited lifetime.
Switching to SimpleFileBackend removes the tagging and sets unlimited
lifetime by to reduce read and write load on this cache.

Change-Id: I5c4778f4c38ae369b6873574e961fa65208d77a1
Resolves: #52295
Related: #52125
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24080
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Configure main extbase caches for unlimited entry lifetime

The extbase reflection and object caches are "stable" cache entries
and only need to be deleted if extensions change or are updates. The
extension manager takes care of flushing in this case.
Currently, the default lifetime of those cache entries is only one
hour, so they are recalculated pretty often. This is especially a
problem if the site was not accessed for more than an hour, since
tons of cache entries exceeded their lifetime and require
recalculation.
The patch moves the cache configuration of the required extbase
extension to DefaultConfiguration and sets unlimited default
lifetime for object and reflection cache.

Change-Id: I671692645aeb104f7fa73595cc79b25ed5984b85
Resolves: #52305
Related: #51116
Related: #52304
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24082
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fatal in DefaultConfiguration

Change-Id: I6f6c8a2ddc26a6c7584e6a067c887768cf3ae5b1
Resolves: #52316
Related: #52305
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/24086
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fix PHP warning trigged in getAuthInfoArray()

AbstractUserAuthentication::getAuthInfoArray() calls
$GLOBALS['TYPO3_DB']->cleanIntList() with a possible NULL argument.
This leads to a PHP warning in GeneralUtility::trimExplode().

Resolves: #50913
Relates: #42921
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I42ddf8fed715c5f8ce060e6ca5826ef3ed8f223e
Reviewed-on: https://review.typo3.org/24003
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] groupFor-VH does not work with @lazy

If you group an property with annotated @lazy option
f:groupedFor-ViewHelper can't group by this property.

Resolves: #52266
Releases: 6.2, 6.1, 6.0
Change-Id: Ie208b67eec8500fee87ee1c62b1bd348c0ed5598
Reviewed-on: https://review.typo3.org/24088
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fix jumpToUrl()-Usage in Element Browser

The Javascript functions jumpToUrl(URL,anchor) and jumpToUrl(URL,formEl)
cannot be used interchangeably. This leads to a javascript error,
because the formElement is rendered as string
("[object HTMLInputElement]").

Resolves: #50437
Releases: 6.0, 6.1, 6.2
Change-Id: I53e1be3c157a2ef6c646f02af15e8c746b6e6375
Reviewed-on: https://review.typo3.org/24094
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Clear cached menu by tag

This change adds a table cf_cache_hash for clear cache by tag
for example for cached menu.

Resolves: #51588
Releases: 6.2, 6.1, 6.0
Change-Id: I18b8aad3ac82737bbc52d4aae49be9028b6df944
Reviewed-on: https://review.typo3.org/23624
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Piotr Molewski
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
(cherry picked from commit f6a8c13d3f71be582147be19d105046fce1d82ad)
Reviewed-on: https://review.typo3.org/24096
[BUGFIX] EmConfUtility accesses non-arrays

Properly check for array-type before accessing
or counting the variable.

Resolves: #52045
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Id161fddadbbcadd462de36e8227278107f2e7a3a
Reviewed-on: https://review.typo3.org/24098
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Check for string before using strlen

If pi_flexform is converted to an array already, checking via strlen
produces a warning. An additional check via is_string suppresses the
warning.

Resolves: #52091
Resolves: #51684
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I97c41cdedb1afb28e2a9ca39e1d9cfb3921d9f47
Reviewed-on: https://review.typo3.org/24090
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Incomplete backup in AbstractUserAuthenticationTest

The test for issue #50913 exchanged TYPO3_DB with a mock. In 6.0,
this global must be backed up manually.

Change-Id: I7aea5646cd6ce157d86930857e3c6a306f9cfd4f
Resolves: #52346
Related: #50913
Releases: 6.0
Reviewed-on: https://review.typo3.org/24119
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Initialize extension name in command requests

This patch initializes the extension name in the configuration manager
as soon as it is available during an Extbase command line request.

Resolves: #51329
Releases: 6.2, 6.1, 6.0
Change-Id: I73b0f0e7a0b20e1773c9eb92f0d2175416ce2bb1
Reviewed-on: https://review.typo3.org/24125
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] TS is fetched from cache incorrectly sometimes

If $TYPO3_CONF_VARS['FE']['defaultTypoScript_constants'] or
$TYPO3_CONF_VARS['FE']['defaultTypoScript_setup'] are set through
the PHP code, cached TS will not be found in cache. This would
result in TS parsing every time when there are USER_INT objects
on the page. It may slow down the page with USER_INT objects
by about 300% comparing to the cached version.

This change is re-added after it got reverted due to lack of reviews in
Ia0fd65a35897c71d60c48c0b03098ce67ad16c70.

Change-Id: Ief3a065451644423b236489729716b906f3d4500
Resolves: #43540
Releases: 4.5, 4.7, 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/24178
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
[TASK] Use instanceof comparison instead of string comparison

This allows the ViewHelper to render elements which are extending
the model.

Resolves: #52469
Releases: 6.2, 6.1, 6.0
Change-Id: If4b9b3019b44e38a5a25cb74ff993e572464bb9d
Reviewed-on: https://review.typo3.org/24399
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[FEATURE] Backport ClassNamingUtility

ClassNamingUtility is useful since the introduction of namespaces
in 6.0. Originally this feature was introduced with 6.1.

Change-Id: I7ccc2a25e60c5deda36cdce0c3eaab213101ab49
Resolves: #50756
Releases: 6.0
Reviewed-on: https://review.typo3.org/22795
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn