[TASK] Optimize speed for instantiating class with arguments

PHP reflection has quite an overhead in performance.
Use a switch construct like in Flow instead to
instantiate classes with up to 8 arguments without
reflection.

Resolves: #53682
Releases: 6.2, 6.1, 6.0
Change-Id: I82ecf0b1ea9a412a39b4429d7689f2bb6489f3df
Reviewed-on: https://review.typo3.org/26363
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Fix side effect for new class instantiation

With commit 6eb7a54 performance optimized class
instantiation code has been committed. This code
removed the side effect of a reflection exception
being thrown when a not existing class is instantiated.

Code in ContentObjectRenderer relied on this side
effect, so we have to fix that and properly test
if the class exists instead.

Additionally this change adds some more comments
to the new instantiation code that has been forgotten
in the last commit.

Resolves: #54425
Releases: 6.2
Change-Id: I8962434d60f80daf77ccdce7a8148e26f8fee267
Reviewed-on: https://review.typo3.org/26440
Reviewed-by: Marcin S?gol
Tested-by: Marcin S?gol
Reviewed-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Anja Leichsenring
Reviewed-by: Anja Leichsenring
Tested-by: Tobias Liegl
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[TASK] Superfluous comparison in Language

Fix superfluous comparison against boolean in
Laguage::getLanguages

Change-Id: Idbf4c1f234eb1c60c01ea130095759ef49ce71c0
Resolves: #54054
Releases: 6.2
Reviewed-on: https://review.typo3.org/25741
Reviewed-by: Xavier Perseguers
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Superfluous comparison in RelationHandler

Fix superfluous comparison against boolean in
RelationHandler::readForeignField

Change-Id: I77f17dee6a14da7779dfe8e37bc73f33a3d02cb5
Resolves: #54048
Releases: 6.2
Reviewed-on: https://review.typo3.org/25735
Reviewed-by: Jo Hasenau
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Superfluous comparison in DataHandler

Fix superfluous comparison against boolean in
DataHandler::versionizeRecord

Change-Id: I345917b9eb29f3cbb39a137f624926888dec623a
Resolves: #54051
Releases: 6.2
Reviewed-on: https://review.typo3.org/25738
Reviewed-by: Jo Hasenau
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Superfluous comparison in OpendocsController

Fix superfluous comparison against boolean in
OpendocsController::checkAccess

Change-Id: I0682042848f2f25856506d5949fc724853c43948
Resolves: #54052
Releases: 6.2
Reviewed-on: https://review.typo3.org/25739
Reviewed-by: Jo Hasenau
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] fileadmin is hardcoded in install tool

In the class "DefaultFactory", "fileadmin" is hardcoded.
The function "getDefaultStructureDefinition"
must take care of the $GLOBALS['TYPO3_CONF_VARS']
['BE']['fileadminDir'] configuration variable.

Resolves: #53872
Releases: 6.2
Change-Id: I17c836a58ea70d218170a33e28ca578bb50eef0b
Reviewed-on: https://review.typo3.org/25640
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Cleanup usage of getPageRenderer()

Change-Id: Id2dc49c9a5e5ca3ede14bc82218dd9ccdc7628ca
Resolves: #54123
Releases: 6.2
Reviewed-on: https://review.typo3.org/25844
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Pagetree pointer cursor broken since ExtJS upgrade

Icons in the pagetree should show cursor:pointer on hover.
This changed with ExtJS-upgrade in #52933 because of
x-unselectable.

Since in the pagetree we need x-unselectable unfortunately
manually bring back the old cursor-behaviour.

Change-Id: If6fa45b0e3491d9180855a4d0a462c5fb559d476
Resolves: #54238
Releases: 6.2
Reviewed-on: https://review.typo3.org/26099
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Marcin S?gol
Tested-by: Marcin S?gol
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Remove ElementBrowser::isReadOnlyFolder

ElementBrowser::isReadOnlyFolder is not required any more because the
check if the folder is writable has been moved to the methods that
create the file upload and folder creation forms.

The method and the parts where it was used were removed.

Additionally the check if the user is allowed to create folders
by TSConfig was moved to the createFolder method to reduce the amount
of duplicate code.

Resolves: #47648
Releases: 6.2, 6.1, 6.0
Change-Id: Ic6504c8def80012cbe420fc83539cfa859a53c0d
Reviewed-on: https://review.typo3.org/25358
Reviewed-by: DANIEL Rémy
Tested-by: DANIEL Rémy
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Form Wizard saving destroys Radio Buttons

This fixes a wrong parsing of \r\n characters for radio
button options.

Resolves: #53727
Releases: 6.2, 6.1, 6.0
Change-Id: I9a88be010a7dd982776bee4a98ba99d97fcc406b
Reviewed-on: https://review.typo3.org/25482
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] felogin: Unknown modifier in regular expression

A regular expression in FrontendLoginController
contains an unknown modifier. Fix it by replacing the
/ to # at the beginning and the end of the regular
expression.

Change-Id: Id4d3439c1cdbec691d977570bf76ba0c7bad493c
Resolves: #52059
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/23881
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Uncaught exception if editor has no file mount

If an editor has got no file mounts, an uncaught exception
is shown in the element browser.

Fix this by checking if there is a selected folder at all.

Resolves: #52969
Releases: 6.2
Change-Id: I5f9e8cc7994edd69f6db6ae1cc647ee31e4930c6
Reviewed-on: https://review.typo3.org/25357
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] ArrayIterator::seek() warning in ElementBrowser

ElementBrowser calls Folder::getFiles() with wrong parameters.
Properly implement the file extensions filter.

Resolves: #51752
Releases: 6.2, 6.1, 6.0
Change-Id: I56468c79225e2d3baa5e5784571074532e2287ad
Reviewed-on: https://review.typo3.org/25359
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Moving files and folders doesn't update hashes

The ResourceStorage does not properly make use of the Indexer.
As result the indexRecord is not properly updated after a
file change.

This patch cleans up the ResourceStorage so it doesn't update
the index properties itself but leaves that to the indexer.

Resolves: #53655
Releases: 6.2
Change-Id: I249505a1bc0b93f8b3ffb0e9cb2b7f10a9a9968e
Reviewed-on: https://review.typo3.org/25481
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Access to sys_files is incompatible to fe_access checks

The system extension filemetadata adds access restriction fields
for selecting frontend user groups as known from tt_content or
pages. Behind the scenes of the TCEform this relation is stored
in a MM table which is incompatible to the usual access checks.

In addition a opposite relation is added to fe_groups which
queries all files to show in a selector.

This change removes the MM table and reconfigures the fe_groups
field in the same way as it is done for tt_content and pages.

Resolves: #54236
Resolves: #54237
Releases: 6.2
Change-Id: I8a05073dee9e57e48335e1fe2a3917313563ac7d
Reviewed-on: https://review.typo3.org/25987
Reviewed-by: Markus Klein
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Frans Saris
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Use correct file data variable in Indexer

The processChangedAndNewFiles() method in the Indexer class now uses
the $fileIndexEntry variable for retrieving a file object from the
resource factory instead of the invalid $data variable which is NULL.

Resolves: #54312
Releases: 6.2
Change-Id: I3b9c2ce99f7b4b7c575cc4055c02912c306ed789
Reviewed-on: https://review.typo3.org/26339
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[FEATURE] Allow the activation of packages during runtime

Due to the nature of the Flow Package Manager, packages cannot
be activated and directly used during runtime. Before the Package
Manager it was possible to activate/deactivate extensions in
AdditionalConfiguration.php under certain custom conditions.

This patch introduces a new setting in $GLOBALS['TYPO3_CONF_VARS']
['EXT']['runtimeActivatedPackages'] = array('{packageKey}') that
gets initialized right after the package management initialization.

Resolves: #53015
Releases: 6.2
Change-Id: Id3b85a3feb00876d2a04a02e85450a4568eb5bff
[TASK] Unify NULL default value handling

If a field is configured to allow NULL values ("eval" is set to "null")
and the default value in the TCA is explicitly set to NULL the value
will not be converted to a string.

Additionally the mode setting "useOrOverridePlaceholder" will not have
any influence any more on the default value when creating new records.

Resolves: #54412
Releases: 6.2
Change-Id: Ica43a1af33e6f86dd042b66781acc0e9cd904cf9
[TASK] Use FAL functions for image rendering

Instead of relying on the backward compatiblity layer of the
FrontendContentAdapterService when rendering images with
css_styled_content the render_textpic method is modified so that it
is also be possible to use FAL functions and properties for image
rendering.

The captionsSplit / imageTextSplit constants are removed because
every image has its own properties for that with FAL and they are
not needed any more.

The globalCaption rendering was removed because the captions are now
always attached to a single image.

The longdescURL handling was also removed because the files do not
have this property at the moment and the longdescURL field for
tt_content records is also not visible in the Backend.

Resolves: #53764
Releases: 6.2
Change-Id: I1d9c8ad1d7a498816e724960613818a05d587d4f