[BUGFIX] New content elements are always stored on pid 0

Due to patch https://review.typo3.org/#/c/30305/ the string comparison
on colPos fails and new content elements are always stored on pid 0.
This patch corrects the check for an integer colPos type by setting the
unused variable to NULL.

Resolves: #59059
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: Iecd7f0cacf5c9315d882eebeb3893bcfa63ae7eb
Reviewed-on: https://review.typo3.org/30389
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Added missing TCEforms palette-header padding

With the cleanup of the backend styles a padding of the
pallete header got missing.

This patch adds this padding just like the other headers
in the TCEforms.

Resolves: #59160
Releases: 6.2
Change-Id: I25ca0ccb0bbd7f4f6d014e12f1cebe1b12050718
Reviewed-on: https://review.typo3.org/30458
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] Parent language is not applied to new child records

If localizing a parent-child structure, usually the language
of the parent element shall be applied to related child records
as well as new child records.

Due to a missing array segment, the accordant section in the
the InlineElement source code never was processed.

Resolves: #57063
Releases: 6.2, 6.1
Change-Id: I7e563044f9889538f9b8171f71f7685722db8266
Reviewed-on: https://review.typo3.org/30448
Reviewed-by: Markus Klein
Reviewed-by: David Greiner
Reviewed-by: Wouter Wolters
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Correct minor typo in "About TYPO3 CMS"

This patch corrects a minor typo in module: Web -> About TYPO3 CMS.
It currently reads "TYPO3 CMS is a enterprise-class...", but it should
read: "...is an enterprise..." ("an" with a "n").

Resolves: #59187
Releases: 6.2
Change-Id: I4e77e54dded08ef4cbdd484d81660a1e39241986
Reviewed-on: https://review.typo3.org/30476
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Indexed search static call to non-static function

Resolves: #58756
Releases: 6.2
Change-Id: Ide09c7792e9b24afe480230893cac18570ce4f19
Reviewed-on: https://review.typo3.org/30069
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] EM: Handle missing dependencies in emconf

ext_emconf.php may lack the dependencies array. This will cause
a PHP warning in a foreach loop.

Fix this by checking for the type first.

Resolves: #58640
Releases: 6.2
Change-Id: Ifb04268e04f5349282f895f6b3d7354dbc45affc
Reviewed-on: https://review.typo3.org/29947
Reviewed-by: Christian Kuhn
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Fix redirect to install tool in new installations

When setting up a new TYPO3 installation, TYPO3 should redirect
to the install tool, when accessing the frontend or backend.

This redirect fails since introduction of the trustedHostsPattern
since no configuration is available at this point, while the
request itself is a BE or FE request, which will be denied in this
case.
Solution is to set the REQUEST_TYPE to INSTALL before doing the redirect
to install tool so that creating the redirect is allowed.

Resolves: #59087
Releases: 6.2, 6.1
Change-Id: I31bcbc20fa1c9bca0d6bf2b940bf26b9affe893b
Reviewed-on: https://review.typo3.org/30376
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Use self:: where possible in GeneralUtility

It's common sense to use self:: where possible because it's quicker and
makes code better understandable.

This change fixes 2 violations in \TYPO3\CMS\Core\Utility\GeneralUtility

Releases: 6.2
Resolves: #59001
Change-Id: Ie56a6697186426e3ff082b1694572c885c8420f5
Reviewed-on: https://review.typo3.org/30257
Reviewed-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Admin panel text selection

Fixes: #58485
Releases: 6.2
Change-Id: I9c3243b2cca9edb89d262a4d3f9cde17b906d440
Reviewed-on: https://review.typo3.org/30118
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Tymoteusz Motylewski
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Flexform element title is cropped to hardcoded length

The title of a flexform element is cropped to maximum length of 30
characters. Instead it should obey the maximum title length in the user
settings.

Resolves: #58910
Releases: 6.2, 6.1
Change-Id: I28c6fc94b2d492217479bf014ff8f67463b4e98f
Reviewed-on: https://review.typo3.org/30242
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Do not use self:: within closures

This is not possible in PHP 5.3.

Resolves: #59203
Releases: 6.2
Change-Id: I108578f7635c50493a3b5d7a7fc81c021805abf8
Reviewed-on: https://review.typo3.org/30489
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Always add wrapping div if dividers2tabs is disabled

TCEforms is not wrapped in a div when dividers2tabs is disabled 
and a inline-element form element is present. As a result there 
is no background image/color shown.

This changes removes the check as the wrap is also needed when
inline-elements are present.

Resolves: #59163
Releases: 6.2
Change-Id: I8772fce0d99bacdf18692308c700c02c0a0defcf
Reviewed-on: https://review.typo3.org/30461
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Kay Strobach
Tested-by: Kay Strobach
Reviewed-by: Frans Saris
Tested-by: Frans Saris
[BUGFIX] Keep session cookie if session data is present

The AbstractUserAuthentication::checkAuthentication() method calls
the logoff() method on every failed login attempt.

Since a logoff also causes a removal of the cookie,
any (anonymous) session data will be left unaccessible.

Keep the cookie when session data is present.

Releases: 6.2
Resolves: #58713
Change-Id: I744456f62197a7278635d8564d4883564d954dd2
Reviewed-on: https://review.typo3.org/30485
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Make object access work with ObjectStorage

ObjectAccess->getPropertyPath() does not work with
ObjectStorage and numerical indexes, but it should be
because without it form fluid fields cannot be
properly handled as the value is always null.

Fixing fetching objects from ObjectStorage by index
will also enable shorter access of single objects in Fluid.

Imagine you want to render the first image in your
template. Previously you had to write this:

<f:for each="{object.images}" as="image" iteration="iterator">
	<f:if condition="{iterator.isFirst}">
		<f:image image="{image}" alt="" width="50"/>
	</f:if>
</f:for>

Now you can just write:

<f:image image="{object.images.0}" alt="" width="50"/>

Resolves: #37126
Related: #37000
Releases: 6.2
Change-Id: I45122bd145b5a179ad3e9e3894520f9a614906c8
Reviewed-on: https://review.typo3.org/29923
Reviewed-by: Markus Klein
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Fabien Udriot
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] TCA maxitems for FAL permissions wrong

The setting for maxitems in the TCA of be_users and be_groups for
FAL permissions are wrong.
Fix the value to match the number of available options.

Resolves: #59263
Releases: 6.2
Change-Id: Ib38aab8bbd1f5fe9287ff0523139f88520f27e37
Reviewed-on: https://review.typo3.org/30518
Reviewed-by: Frans Saris
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Enhance resource storage hooks

Emit postFileCreate and postFileSetContents signals and add
provide the original folder in the postFileMove and the
postFolderMove signals.

Resolves: #59294
Releases: 6.2
Change-Id: Ia4096b38671f3312a1488587972d4883368de05c
[TASK] Reusable getCategoryFieldsForTable itemsProcFunc

Allow the usage of the method
\TYPO3\CMS\Core\Category\CategoryRegistry->getCategoryFieldsForTable
that can be used as itemsProcFunc for select fields in the TCA in
multiple context by introducing a new categorizedTable configuration key
in the config section of a column in the TCA.

This configuration key can either consist of a single string containing
the name of the table or a configuration array to define additional
conditions that need to be true so that a configured table is used.

Resolves: #53045
Releases: 6.2
Change-Id: I128cbeb6747a8f83e68cdaaaafbc3ab5901353d4
[WIP][FEATURE] Skip access check for content_from_pid

This patch introduces a new config option called
config.content_from_pid_skipAccessCheck.

If this option is TRUE no access check will be performed for the
page from which the contents should be displayed.

Resolves: #57079
Change-Id: Ib2bf94674b136c09424a5adf7b8000bb5d6ba634
[TASK] Unify data for jump URL hash generation

The jump URL generation is unified and moved to a new JumpUrlUtility
class. All methods in the ContentObjectRenderer are now using the same
method for creating jump URLs.

The handling of file and directory names with special characters is
improved and FAL file records with special characters in their file names
will also be URL encoded.

Additionally Unit Tests are added to verify the jump URL function.

Resolves: #52156
Releases: 6.2
Change-Id: I7d2d8cec005aae56a118850071ca669ef9740c9d
[BUGFIX] Correct order of key / field deletion

Prevent a SQL error when deleting a key and the field belonging
to the key in the install tool at the same time.

Therefore the order for deleting keys and fields is changed from
field first and key second to key first and field second.

Resolves: #50450
Releases: 6.2
Change-Id: I30aff6ea6c2bf01dec6197eec8fd3aa7306cfcbb