[TASK] Fix travis builds

Due some regressions on side of travis
(https://github.com/travis-ci/travis-ci/issues/1710) an older git version
is used which doesn't support things like "--single-branch".

To avoid this, git is updated to latest version on the build server before
starting cloning

Change-Id: Ic5f698e84f378b9fed6bd64398b8058a20be860e
Resolves: #54369
Releases: 6.2
Reviewed-on: https://review.typo3.org/26366
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUGFIX] No double htmlspecialchars for filemount select

Since the labels and values of select items are run through
htmlspecialchars by the FormEngine there is no need to use
htmlspecialchars in the renderTceformsSelectDropdown() method which
generates the select items for the filemount Backend form.

The current code will htmlencode the select value twice which results
in a htmlencoded value in the database which causes problems with
directory names that contain special characters.

Resolves: #54027
Releases: 6.2, 6.1, 6.0
Change-Id: I7ec8262f6c3d20879cde0679636a6a8e5c1d19cd
Reviewed-on: https://review.typo3.org/25770
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Oliver Klee
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Followup Fluid Template Fallback paths

In the previously merged patch are some glitches and a regression:
- The usage (and test for existence) of deprecated functions has been
  removed.
- The value passed by the old behaviour is now considered last place
  in the array providing the lookup paths
- The typo preventing usage setLayoutPaths() has been removed.

Intended usage:
plugin.tx_a.view.templateRootPaths {
	default = <some default path>
	extendedA = <some additional path>
}
The array gets reversed and the first hit will be used as template.
In case only numeric indizes are used, the entries get ordered.
See unit tests for a more specific description.

Change-Id: If4fa75347614cf9b352c6016430a928833cc62cd
Resolves: #52971
Documentation: #52761
Releases: 6.2
Reviewed-on: https://review.typo3.org/24903
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Marc Bastian Heinrichs
Tested-by: Marc Bastian Heinrichs
[BUGFIX] Create valid file reference index data

This patch prevents the creation of sys_refindex entries that point to no
table and no record.

Additionally it fixes the array structure for the creation of
sys_refindex records for sys_file relations.

For deleted file references no reference will be created between
sys_file and the referenced table.

The configuration for the uid_foreign field was changed from a select
field for tt_content records to a normal input field to prevent the
creation of invalid refindex data. To which table uid_foreign is
pointing depends on the tablenames field.

To make sure both sides of the relation of a sys_file_reference appear
in the refindex table the exclusion of sys_file_reference as
foreign_table is removed.

Resolves: #53712
Releases: 6.2, 6.1, 6.0
Change-Id: Ic864ade10e4e97fbd9017b9c779be68d911dd626
Reviewed-on: https://review.typo3.org/25476
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[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
[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
[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
[FEATURE] Custom active tab in RTE element browser

Introduce a flag that prevents the element browser of rtehtmlarea
from overwriting the active tab that was set by a hook object.

Resolves: #49036
Releases: 6.2
Change-Id: Iebfda39714caa98c0d2023992bbf63a2f5b9b01a
[TASK] Non extension dirs in llXmlAutoFilename

Allow non extension dirs (e.g. fileadmin) in
\TYPO3\CMS\Core\Utility\GeneralUtility::llXmlAutoFilename()

Fixes: #34728
Releases: 6.2, 6.1, 4.7, 4.5
Change-Id: I073f42ec8b6d733246151df331201031187e1baf
[FEATURE] Allow escaping of dots in TypoScript key

This patch allows the use of backslashes to escape
dots in TypoScript keys, for example:

my\.escaped\.key = test

will result in a single key "my.escaped.key" with the
value "test".

Resolves: #29461
Releases: 6.2
Change-Id: Idcaae75d9a8800134f4a82e0740ddabe35b3df89
[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
[BUGFIX] Prevent exclude field mixup in FromEngine

Use a local variable for storing the excluded fields in the
FormEngine to prevent the configuration from being overwritten
by the inline form element renderer.

Fixes: #47359
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I5a7a2de16d767f854b4d3f89d599deec28266092
[BUGFIX] URL encode special characters in getPublicUrl()

The FAL method getPublicUrl() in the ResourceStorage should return a
valid URL. To archive this special characters and spaces are URL
encoded in the LocalDriver.

Resolves: #52806
Releases: 6.2
Change-Id: If1f3b6513b6feb0f24cd91be6998a686b54c467e
[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
[TAKS][CONF] Accept other settings in [SYS][setDBinit]

Since the mysqli interface recommends setting the charset using the
mysqli API the utf8 charset will be initialized when establishing the
database connection using mysqli_set_charset().

Additionally [SYS][setDBinit] can now be set to any value or can totally
be removed. To make sure the database connection still uses the utf8
encoding an additional check is added to the bootstrap process that
checks the MySQL character set session variables.

Finally the old default value of [SYS][setDBinit] will automatically be
removed if it is set to the old default value.

Resolves: #41596
Releases: 6.2
Change-Id: I8d0a9eba50495d52accb59627147c1c87b6a9bb5
[BUGFIX] Correct file language overlay for pages

This patch corrects the fields the FILES content object is using for
doing the language overlay for file references for fields in the pages
table.

Instead of the _LOCALIZED_UID that is only available for other record
types the _PAGES_OVERLAY_UID field is now used to check if there
is a translated version available.

Resolves: #47869
Releases: 6.2, 6.1, 6.0
Change-Id: I2465a9e3ccd49223cc44885ffba8484788e1b669
[BUGFIX] Correct handling of empty Backend Layouts

Since the default value of the page properties backend_layout and
backend_layout_next_level is an empty string the value in the select
item is changed from zero to an empty string for consistency.

Additionally the BackendLayoutView will treat an empty string equally
as a zero namely as a non set Backend Layout.

Resolves: #52596
Releases: 6.2
Change-Id: Ic792f748d005f5749f24a3e979b304c23320c8fa
[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
[BUGFIX] PackageManager in impexp extension select

Replace invalid usage of old $TYPO3_LOADED_EXT array with calls to the
PackageManager in the extension selector of the impexp Extension.

Resolves: #53122
Releases: 6.2
Change-Id: Ie2b715986a0803c26e3fd0ae891dedce5ddc634d
[BUGFIX] Allow NULL values in INSERT queries

Currently only UPDATE queries pass the $allowNull parameter to the
fullQuoteStr() method in the DatabaseHandler. To make the behavior of
both methods consistent and to allow NULL values during creation of
new records by TCEmain the $allowNull parameter is also set to TRUE for
INSERT queries.

Resolves: #53662
Releases: 6.2, 6.1, 6.0
Change-Id: I066b9880a557b6c9058fc15f467631f1313300f9