[BUGFIX] IndexedSearch: Fix various issues in extbase plugin

Fix these bug in the experimental extbase plugin of IndexedSearch:
 * TypoScript does not appear in include_static_file
 * Fatal error because views use variable named differently in
   Controller
 * Pagination does not work because the form is not present on
   resultpage which breaks JavaScript

Change-Id: I55962d07c543a10358298d7e9c8096c18bc0a615
Resolves: #58003
Releases: master
Reviewed-on: http://review.typo3.org/30023
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Cedric Ziel <cedric@cedric-ziel.com>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Sebastian Schawohl <s.schawohl@magnetic.coop>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[CLEANUP] Use comments not PHPDoc style comments in copyright block

This regular expression was used to replace PHPDoc style comments
with ordinary comments:

Search:
/\*\*(\n \* This file is part of the TYPO3 CMS project.)

Replace with:
/*$1

Resolves: #63328
Releases: master
Change-Id: Ic8f11dbfefee94a19657c8fe8426c81d1cb435d8
Reviewed-on: http://review.typo3.org/35103
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
[CLEANUP] Clarify configuration preset description

The description of the configuration preset in
install tool is a bit misleading which causes people
to confuse this with the Application Context feature.

Remove the mentioning of application context from context preset
and move it to the top.

Releases: 6.2, master
Resolves: #63622
Change-Id: I8acc9032333f0ead6a35c2c7202a07d2668e7c51
Reviewed-on: http://review.typo3.org/35090
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[TASK] Remove usage of property $new_unique_uid

The property $this->new_unique_uid in PageLayoutController
is never used. Some very strange and dead code can be
just removed.

Resolves: #49608
Releases: master
Change-Id: If4857d412baf21942d5c5a650922dfc8668689ee
Reviewed-on: http://review.typo3.org/21818
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[BUGFIX] Ensure argument is an array in ContentObjectRenderer

This patch ensures that at least an empty array is passed to the
array_replace_recursive function to avoid warnings during rendering.

Resolves: #63701
Releases: master, 6.2
Change-Id: I047f45bd5199216aec6f37a0c9b0526c455cad92
Reviewed-on: http://review.typo3.org/35181
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[TASK] Extbase: Traverse validation results until first error

When deciding whether to call the action method or error method it's
sufficient to traverse results until the first error.
To improve performance break the foreach on first
found (not ignored) error.

Resolves: #63726
Releases: master, 6.2
Change-Id: I988cb5c8ac20518c359db75bb46fe6702c549cf6
Reviewed-on: http://review.typo3.org/35220
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Steffen Müller <typo3@t3node.com>
Tested-by: Steffen Müller <typo3@t3node.com>
[FEATURE] Implement endInsertObject signal after object is registered

By implementing a new signal when a newly persisted object is
registered in the persistence session, it is possible to manipulate
and persist the object using the repository update method.

Change-Id: Icd4da1b55ce0ea3546ec8aa46240da54afefa960
Resolves: #63100
Releases: master
Reviewed-on: http://review.typo3.org/34395
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[FEATURE] Add signal for mailer initialization

This signal allows for additional processing upon initialization
of a mailer object, e.g. registering a Swift mailer plugin.

Resolves: #62960
Releases: master
Change-Id: I048de8ef422911d5863ab2a05312dc7f8c7d195f
Reviewed-on: http://review.typo3.org/34176
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Revert "[TASK] Remove usage of property $new_unique_uid"

This reverts commit cf2eb86c799b652d64ea6858dd2715444e232c0b.

The removed code is not dead and should not be removed
without detailed investigation.

Change-Id: I4291a6ff4b06b74fb9fb5e757fc738f8bd413ca5
Reviewed-on: http://review.typo3.org/35393
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[BUGFIX] Add autocomplete for t3editor FILES

Add autocomplete values for t3editor
because there was no implementation for new cObj FILES

Resolves: #53129
Releases: master, 6.2
Change-Id: Id4c5d7e51850546cb07ae289c96107834b8e7921
Reviewed-on: http://review.typo3.org/25053
Reviewed-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
[BUGFIX] Fix failing unit test

A unit test causes a fatal error due to newly introduced dependency
to SignalSlotDispatcher. The fix extends the mocking to prevent
the FATAL error.

Change-Id: I02c6cf2cda07bd965a3cbbd1512d7e80fac8f908
Resolves: #63882
Relates: #62960
Releases: master
Reviewed-on: http://review.typo3.org/35395
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
[TASK] Use better implementation for array check

To suppress PHP warnings the input parameter must always be an array.
If there is nothing to merge, the array_merge_overrule function
must not be called at all.

Change-Id: Ice369449da22ff62c09efa919272195bd141e836
Resolves: #63827
Relates: #63701
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/35388
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[CLEANUP] Add missing empty lines after namespace statements

At the moment in some classes you can find an empty line between the
copyright comment and the namespace statement. In some other classes
there is no such empty line.

This commit adds an empty line after the namespace statement if there
is no empty line.

This is not part of the TYPO3 CMS CGL but increases consistency in this
area.

This regular expression was used to add the empty lines:

Search:
(namespace .*\n)(/\*)

Replace:
$1\n$2

Resolves: #63831
Releases: master
Change-Id: I14c08c64ccbdb39001a5c303c629b1dfaa3a6c0f
Reviewed-on: http://review.typo3.org/35392
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[CLEANUP] Add missing empty lines after copyright comments I

At the moment in some classes you can find an empty line between the
copyright comment and the first PHPdoc bock comment. In some other
classes there is no such empty line.

This commit adds an empty line between those comments if there is no
empty line.

This is not part of the TYPO3 CMS CGL but increases consistency in this
area.

This regular expression was used to add the empty lines:

Search:
( \* The TYPO3 project - inspiring people to share!\n \*/\n)(/\*\*\n \*)

Replace:
$1\n$2

Resolves: #63828
Releases: master
Change-Id: I1d921921a3f60a62c29de3300b25b5df36a43b0a
Reviewed-on: http://review.typo3.org/35390
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[CLEANUP] Add missing empty lines after copyright comments II

At the moment in some classes you can find an empty line between the
copyright comment and the first use statement. In some (far less) other
classes there is no such empty line.

This commit adds an empty line between those comments if there is no
empty line.

This is not part of the TYPO3 CMS CGL but increases consistency in this
area.

This regular expression was used to add the empty lines:

Search:
( \* The TYPO3 project - inspiring people to share!\n \*/\n)(use )

Replace:
$1\n$2

Resolves: #63829
Releases: master
Change-Id: I4b28a1cfcfc727016ac5d89b3988d236270f37e2
Reviewed-on: http://review.typo3.org/35391
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[BUGFIX] Don't override the class on the Form elementWrap

This Changeset fixes an issue, which made it impossible
to give the layout.elementWrap a class attribute, because it
is was simple overridden.
Now it checks if a class is set and appends the default csc-form-*
classes instead of overriding it.

Resolves: #48404
Releases: master, 6.2
Change-Id: I20fec83d28b2e727f268ee00dab830c39c5f15a1
Reviewed-on: http://review.typo3.org/20939
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Form localization depending on old class names

Since the introduction of the PHP namespaces some of the localisation of
FORM is not working anymore. The localisation label is depending on the
class name by using get_class(). The localisation is depending on the
old class names which has not been adapted afterwards.

This patch solves this issue by removing the get_class() calls by
using a constant.

Change-Id: I7ba846620732b61e05e210f227c02b63c1198284
Resolves: #47817
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/20415
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Fatal Error in filelist when editing

Regression fix for #61958

Fixes: #63825
Releases: master
Relates: #61958
Change-Id: I06818243c296ac20b5b5f251e5ab57c6a6008632
Reviewed-on: http://review.typo3.org/35385
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
[BUGFIX] Bad index for determineSiteRoot

Extbase in the backend fires a query to the pages table where
deleted=0 AND hidden=0 AND is_siteroot=1 ORDER BY sorting LIMIT 1

The patch changes an index that was added for this query to
reduce the result more quickly, with the assumption there is only a
very small number of is_siteroot=1 pages in comparison to deleted
and hidden pages. Also hidden and deleted are not any longer part
of the index, since order by sorting with limit 1 will break the
rest of the result set very early.

Target of the patch is master only since the 6.2 variant is not
that bad, so there is no urgend need to force people changing
indexes in 6.2 production systems.

Resolves: #59824
Releases: master
Change-Id: I597516efb7704d929ee869cdaa39cd069421ed4f
Reviewed-on: http://review.typo3.org/31082
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[TASK] Add note about AdditionalConfiguration.php to Install Tool

Add a note to clarify that AdditionalConfiguration.php is always
overruling any setting made within the Install Tool.

Furthermore we add a note to the ConfigurationManager that it is limited
to Core internal usage only.

Resolves: #60650
Releases: master, 6.2
Change-Id: Icaf7d4b1ce5b14ad0618e38e92a49a33405997f7
Reviewed-on: http://review.typo3.org/35409
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>