[TASK] Replace JavaScriptEncoder with json_encode()

The JavaScriptEncoder class is used a lot in the TYPO3 backend. It does
expensive character conversions, character by character.

It would improve performance a lot if we use PHP native json_encode to do
the encoding for us.

Change-Id: I3cb3bd6d887d49565fda496f9b13852cbeb9dfa1
Resolves: #54560
Releases: 6.2
Reviewed-on: https://review.typo3.org/26545
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Marcin Sągol
Tested-by: Marcin Sągol
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Prevent strings from being autoloaded

The introduction of a TypeConverter for Enumaration
types in #52762 added is_subclass() calls to
getPlainValue() in the DatabaseBackends. These methods
are meant to convert objects to simply types but are
regularly called with simple types, in particular strings.

Since is_subclass() also works with strings,
The class loader is triggered when these methods
are called with a table name like "tx_ext_domain_model_foo".

This triggers an issue #55418 in the class loader especially
on case insensitive filesystems.

Instead of is_subclass we now use instanceof to make sure
we only check for conversion if the value is an object.

Additionally this change fixes a wrong case statement which
also was introduced in #52762

Resolves: #54275
Change-Id: If1b2a28a2623e49dfb47720641935c6f24447c19
Reviewed-on: https://review.typo3.org/27079
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Be more expressive in error condition

If lockSSL is set to 1 and the backend is not
accessed via SSL currently a 404 header is sent
with no message body. The same happens when the
client IP address does not mach the configured
list of allowed addresses.

Give a more useful hint for users in these cases
by throwing an Exception.

Resolves: #51378
Releases: 6.2
Change-Id: Ic76d8415c482e78bdea7e57e1cb5dab21a49969f
Reviewed-on: https://review.typo3.org/26718
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Tested-by: Georg Ringer
Reviewed-by: Oliver Klee
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Marcin Sągol
Reviewed-by: Felix Kopp
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Remove useless count function calls in stdWrap

Remove two count calls in the often called stdWrap function
to increase the performance. Furthermore remove the
is_callable calls, because the hook interface take care
that the methods exist and are callable.

Resolves: #55372
Releases: 6.2
Change-Id: Ifc8f831a7b101c5c56f717c23024fae7b71b71a9
Reviewed-on: https://review.typo3.org/27078
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Xavier Perseguers
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[BUGFIX] Tame PackageStates.php in functional tests

Functional test bootstrap creates a full new instance
within typo3temp together with an own database. Goal is
a controlled environment without dependencies to the
parent instance.

The patch introduces separation of PackageStates.php. The file
is now compiled based on a static list of active core extensions
and optional additional extensions for specific functional tests.

Change-Id: I39e37a16b5cef5b6b1dab2ce3c4e8efc42cecbe7
Resolves: #55409
Releases: 6.2
Reviewed-on: https://review.typo3.org/27108
Reviewed-by: Thomas Maroschik
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Display detected fatal in extension check

In the installer fatals can happen during updates of
very outdated extensions. Many updates can lead to a
redirect to the extension check where the user gets
displayed a message that a fatal has been detected.
But the detected fatal error itself is not displayed.

This patch passes the error as url parameter to the
extension check and displays it there.

Fixes: #54943
Releases: 6.2
Change-Id: I111df5d5411015b21c4b2b5e9be3b83b311c8bc5
Reviewed-on: https://review.typo3.org/26781
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Thomas Maroschik
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Klein
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] ClickMenu does not show destination-foldername

Change-Id: I623d243ea504b0e646bd969e55ed7686ad3e9caf
Releases: 6.2, 6.1, 6.0
Resolves: #55407
Reviewed-on: https://review.typo3.org/27106
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Set missing markers to empty string

Change-Id: I3892f88bdd094b390a22fe94d9b089bd9b8aef71
Resolves: #54112
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/27102
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Xavier Perseguers
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK] Increase title column width in Web List module

Each database table has configured title column through
TCA configuration. This values are used by List Module
to render first (title) column on records list table.

Long values are truncated to some predefined number of
characters but since we now use larger font size (12px
instead of 11px), long titles can break to two lines due
to a fixed 300px column size.

This change increases title column width to 350px to
cope with the increased font size.

Resolves: #55406
Releases: 6.2
Change-Id: Ib8277a88bd831a0f0efea40d9500df7df06dc40e
Reviewed-on: https://review.typo3.org/27107
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] TSFE->altPageTitle can not be set in extensions

It is not possible to set $GLOBALS['TSFE']->altPageTitle
in USER_INT extensions anymore to modify the page title.

This has been possible before in the 4.x branches.

Fix this by implementing the title generation like all
other header data.

Resolves: #54467
Releases: 6.2, 6.1
Change-Id: I3d5be34b95cb295b92732d2f2f9bd1f123812365
Reviewed-on: https://review.typo3.org/26785
Reviewed-by: Stefan Neufeind
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Xavier Perseguers
Reviewed-by: Bill Dagou
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Installer: Show correct value for boolean options

Resolves: #53963
Releases: 6.2
Change-Id: I0dd51f2d256c153d6b6a1e247d86c69c5cfd7a7b
Reviewed-on: https://review.typo3.org/25681
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[TASK] Wrong phpdoc in TableGarbageCollectionTask

The phpdoc notation of TableGarbageCollectionTask has some
pre namespaces config example.

This patch changes the phpdoc notiation.

Change-Id: Iaa0a70635893091c0ba99ce17404194c47e9a16c
Resolves: #54529
Releases: 6.2
Reviewed-on: https://review.typo3.org/26507
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Update enableDeprecationLog default value and help text

TYPO3's deprecation_log is disabled by default. The Install Tool
shows an incorrect help text for the configuration
$GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'], claiming
that the default value is "file". In addition, enableDeprecationLog
is set to "file", which should be empty.

The patch removes the value of enableDeprecationLog and removes the
statement about the default value: other values in this area do not
state the default value either and since TYPO3 CMS 6.2 LTS, the
default value depends on the Application Context.

Resolves: #53653
Releases: 6.2
Change-Id: I2061a66b03e1c194f86d346e4183e95d3e959922
Reviewed-on: https://review.typo3.org/25417
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Wrong typehint in TypoScriptFrontendController

The variable $pageCache in TypoScriptFrontendController misses "Core" in
the namespace.

Change-Id: I5f9ee3bf36951194c74627e4e2bc9d17f5c639e5
Fixes: #55448
Reviewed-on: https://review.typo3.org/27141
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] No double slash during folder canonicalization

The canonicalizeAndCheckFolderIdentifier does now check if the given
folder path is just a simple slash (/) and return it before really
canonicalizing the identifier.

This prevents the method returning a double slash (//) which will result
in an error in the isWithin() checkin the local driver.

Resolves: #55420
Releases: 6.2
Change-Id: Ibe189180a459377d042731931066a410e1e5ac51
Reviewed-on: https://review.typo3.org/27122
Reviewed-by: Frans Saris
Tested-by: Frans Saris
[TASK] Missing signals on adding folder

There are signals for most filestorage operations performed
in the ResourceStorage, but not for adding a folder.

This patch adds the two missing signals.

Resolves: #54964
Releases: 6.2
Change-Id: Ia7e3970ea278bf5e74856008afe53083e91f0649
Reviewed-on: https://review.typo3.org/26863
Reviewed-by: Stefan Neufeind
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] Clean up category references when a file is deleted

File are categorizable by default as of TYPO3 6.2
When a BE User deletes a file, associated categories
must be removed as well.

Change-Id: I82175bbd207e68590c20de8fd536bab0de001fe3
Releases: 6.2
Resolves: #55430
Reviewed-on: https://review.typo3.org/27124
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[CLEANUP] Cleanup code in ElementBrowser

This patch does not change functionality.
It just fixes formatting issues of the code and
corrects phpdoc.

Resolves: #53580
Releases: 6.2
Change-Id: I39a7ec757e6dfce8282053c3259a84edc2ba5588
Reviewed-on: https://review.typo3.org/25360
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[TASK] Obsolete code in saltedpasswords

tx_saltedpasswords_autoloader was used in old install tool only
and is obsolete now.

Change-Id: If398a197a18bfda20789afd0aa0104fcd8ba5993
Resolves: #55446
Releases: 6.2
Reviewed-on: https://review.typo3.org/27138
Reviewed-by: Thomas Maroschik
Reviewed-by: Marcin Sągol
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Content Element Wizard Hook labeled wrongly

The message when having a hook for the wizard items
is still the same, although the interface has been
renamed. So the check is valid, but if the check
fails then the message is misleading.

Releases: 6.2
Resolves: #55455
Change-Id: If1b9e4285c02e8a3ab92eee562b6516f24bae9a8
Reviewed-on: https://review.typo3.org/27146
Reviewed-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Tom Ruether
Tested-by: Tom Ruether
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter