[BUGFIX] ClassAliasMap, Tx_ VH namespace and closing tag throws Exception

When using aliased ViewHelper class names and old Tx_ namespace in
template and ViewHelper uses closing tag (not self-closing) an
error is thrown, saying closing tag ViewHelper is not the same
as openening tag ViewHelper (closing tag uses old class name,
opening tag uses new). To solve, TemplateParser now checks if
resolved ViewHelper class names are aliases of other classes and
if so, uses the real class name instead of the alias.

Steps to reproduce error:

* template namespace: {namespace myext=Tx_Myext_ViewHelpers}
* template code: <myext:vh>test</myext:vh>
* namespaced VH class: \Myext\ViewHelpers\VhViewHelper
* ClassAliasMap: Tx_Myext_ViewHelpers_VhViewHelper ->
  \Mext\ViewHelpers\VhViewHelper
* framework: render template using any View

Error 1224485398 "closing tag does not match opening tag" thrown.

Steps taken to fix error:

* run constructed class name through alias resolve method.

Fixes: #54115
Releases: 6.2, 6.1, 6.0
Change-Id: I070b6199095ec84c7213cfc0c3775f5f08340840
Reviewed-on: https://review.typo3.org/25814
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Superfluous comparison in CronCommand

Fix superfluous comparison against boolean in
CronCommand::dayMatchesCronCommand

Change-Id: Ia1d852ffbbc772dd89587d304b1234e11e372d2d
Resolves: #54050
Releases: 6.2
Reviewed-on: https://review.typo3.org/25737
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Re-Introduce feature to go one level up in file list

When the file list has been reworked to use FAL instead of
plain PHP file functions the feature to go one level up has
been removed accidentilly. This patch reintroduces the
original behaviour known from TYPO3 CMS 4.x.

Releases: 6.2
Resolves: #51866
Change-Id: Iad334c90d575f2b2f3b47af71e23c721edd76e1e
Reviewed-on: https://review.typo3.org/25812
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller
[TASK] Add editing of file metadata to ClickMenu

The Context-Menu of files misses the editing pen allowing
to directly edit the metadata of the file. Currently it
only shows the edit-content possibility in case it is a
text file.

This patch adds the missing option.

Resolves: #52835
Releases: 6.2
Change-Id: I869d8a57d2cacc04455df5189b5cc7af02c2e9cf
Reviewed-on: https://review.typo3.org/25811
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Allow Editing field creator_tool in sys_file_metadata

The filemetadata extension adds additional fields to the sys_file_metadata
table. The field creator_tool is defined in SQL and TCA, but not added to
any palette or tab. This patch adds the field to the palette with
related authoring information.

Releases: 6.2
Fixes: #54259
Change-Id: I9e3c3af618b04ddde1c96b3dcb1e4cdf209f6eec
Reviewed-on: https://review.typo3.org/25993
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[FEATURE] Fallback/default case for SwitchViewhelper

In order to provide the full functionality known from the
switch/case PHP function, a default case possibility is
introduced. Use it like:
<f:switch expression="{person.gender}">
  <f:case value="female">Mrs.</f:case>
  <f:case value="male">Mr.</f:case>
  <f:case default="TRUE">Mrs. or Mr.</f:case>
</f:switch>

Resolves: #49371
Documentation: #54283
Change-Id: I6b71ec39173ab957aa392bd595a65ceddadc81c9
Releases: 6.2
Reviewed-on: https://review.typo3.org/23739
Reviewed-by: Cedric Ziel
Tested-by: Cedric Ziel
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Revert "[FEATURE] Fallback/default case for SwitchViewhelper"

This reverts commit 8e022bcbea4f7775ce10fee30b4682a6047c461c

Merged a Feature after Feature Freeze is not acceptable. Sorry. Patch is pushed new but will not be available in 6.2.

Change-Id: I39baa58c70b0e942d01c1c37bbf793b873db385d
Reviewed-on: https://review.typo3.org/26055
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[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
[BUGFIX] Create valid sys_file refindex data

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

Additionally it fixes 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.

Resolves: #53712
Releases: 6.2, 6.1, 6.0
Change-Id: Ic864ade10e4e97fbd9017b9c779be68d911dd626
[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
Releases: 6.2
[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