[BUGFIX] Avoid PHP warning in TypoScriptFrontendController

TypoScriptFrontendController throws a PHP warning on access to
$BE_USER->user['uid'] which might not be set.
Fix this by simply adding an empty() check.

Resolves: #60126
Releases: 6.3, 6.2
Change-Id: I7005baf73bce55d862b4b6b61697c2aa0a877c7b
Reviewed-on: https://review.typo3.org/31685
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[BUGFIX] Send test email in Install Tool as HTML

Explicitly set the format of the email body to text/html.

Resolves: #60251
Releases: 6.3, 6.2
Change-Id: I350b0f4cb9e69cd20dbd439647f56cd9c641b501
Reviewed-on: https://review.typo3.org/31684
Reviewed-by: Pascal Dürsteler <pascal.duersteler@gmail.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[BUGFIX] sys_collection_entries column too small

Set sys_collection_entries to varchar(64). This is the max
table name length on MySQL.

Resolves: #60180
Releases: 6.3,6.2
Change-Id: I253e6eb6cb35db9e6d13a716bfc5c8d89db4ca7e
Reviewed-on: https://review.typo3.org/31698
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[BUGFIX] Fix minor issues in functional testing framework

The bootstrap for frontend functional tests has some
minor issues, that are now fixed:

* json_decode returns null not false when not successfull
* Properly set the SERVER_PORT
* Use correct array key in error message
* Avoid notices with relative URLs

Releases: 6.2, 6.3
Resolves: #60413
Change-Id: I3ff07f01729d3403374759edbaa5ddcccd2e889a
Reviewed-on: https://review.typo3.org/31704
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
[BUGFIX] Fix return value of DatabaseConnection::sql_free_result()

In case of success the current implementation returns the result
of $res->free(). Unfortunately free() doesn't return anything.
That causes sql_free_result() to return NULL, which eventually
evaluates to FALSE.

Make sure the return value is correct and
return TRUE in case of success.

Resolves: #60457
Releases: 6.2, 6.3
Change-Id: I8756d4d2a321adc88738b9ac418207c63b312c86
Reviewed-on: https://review.typo3.org/31719
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[TASK] Update wrong copyright header in file BrowseLinks.php

A new header in PHP files has been introduced with #59535. This
patch updates the copyright/license header of one file, which still
uses the old, outdated information.

Resolves: #60482
Releases: 6.3, 6.2
Change-Id: I642a4ce13331e2aadbd362988b963a8a5c576a29
Reviewed-on: https://review.typo3.org/31733
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Wrong sys_refindex for deleted child records

Workspace actions using the DataHandler trigger a reprocessing
of the reference index. However, it happened that index entries
of the live workspace have been deleted or modified.

The reason for that is a missing SQL statement to limit those
actions to the current workspace only.

The result can be seen in e.g. the workspace module after
having deleted an IRRE child record and how the nesting could
not be determined correctly for that particular record.

Resolves: #59874
Releases: 6.2, 6.3
Change-Id: I850e2fe88999ce8db280d4ef426e43c85fff06da
Reviewed-on: https://review.typo3.org/31738
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
[BUGFIX] Catch all resource exceptions when parsing RTE links

The RteHtmlParser checks for valid links by trying to retrieve
a file or folder object. The FAL API will throw exceptions
if anything goes wrong with the given path.

Catch all these exceptions to ignore the invalid link
and act the same for invalid paths as for not found files/ folders

Releases: 6.2, 6.3
Resolves: #60316
Change-Id: I0752678eb8ed2b596c3a88536d957ec35c172d7b
Reviewed-on: http://review.typo3.org/31745
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
[BUGFIX] Complete datatable structure fe_groups

While creating frontend groups via extbase without any subgroup set,
the record will have the value NULL in the database
for the property subgroup.
This leads to an exception.

This patch only defines TSconfig, subgroups and description not
to accept NULL and to be consistent the tx_extbase_type gets
the default value 0.

Resolves: #60245
Releases: 6.3, 6.2
Change-Id: Ie402d4c47058755efe40cc762f4220ba7dc6b781
Reviewed-on: http://review.typo3.org/31747
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Change sys_file.size type from INT to BIGINT

Regular INT limits filesize to 2GB.

Change-Id: I525bd53bff6495630bd5880c8ef8789a1d9bbf26
Resolves: #60327
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/31752
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Set correct cookie when permalogin is enabled

Although permalogin is enabled we set a session cookie.
This happens because setSessionCookie is called too early
and we do not know yet whether the session should be permanent
and an according cookie shall be set or not.

Solution is to set $this->dontSetCookie = FALSE
which triggers setting the cookie at an appropriate time.

Resolves: #60264
Releases: 6.3, 6.2
Change-Id: Iad5ce8597f90c4a607a43ea4d3368d117fa6b4ed
Reviewed-on: http://review.typo3.org/31754
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[BUGFIX] Fix resource exceptions

When rendering the FILES content object,
exceptions due to missing file references and missing collections
are meant to be caught. However they are not, because
InvalidArgumentException and RuntimeException are thrown instead of
ResourceDoesNotExistException

Throw the appropriate exceptions instead and also
fix a wrong check in RecordCollection Repository, where
the return type is checked against NULL while the DB
call returns FALSE when no record is found.

Resolves: #60506
Releases: 6.2, 6.3
Change-Id: I9cea492d814850f75549d280c2de0defc8b91548
Reviewed-on: http://review.typo3.org/31757
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Catch freshly introduced ResourceDoesNotExistException

Change #60506 introduced a new specific exception in case a file
reference can not be resolved. This new exception now needs to be
catched on the right places.

Change-Id: I545f4eb98386918903380cc3d0b34796a0917b3f
Resolves: #60529
Relates: #60506
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/31765
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[TASK] Add a "save and close" button in the extensionmanager

Resolves: #59812
Releases: 6.3, 6.2
Change-Id: I3ccfbdd496af2fca9a72d2675393537eafffd075
Reviewed-on: http://review.typo3.org/31766
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[TASK] Remove skipped FAL functional tests

Utility/File/ExtendedFileUtilityTest.php contains some old FAL
related tests that are not maintained for quite some time, broken
and skipped.
Functional tests for FAL should be re-written if needed from scratch
so these tests are removed for now.

Resolves: #60541
Releases: 6.3, 6.2
Change-Id: Ib703f5c4bbd5d52ef5c67f0fc2f2387772c315fd
Reviewed-on: http://review.typo3.org/31769
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Add label for title of "Edit metadata" link

Currently the title of the "Edit metadata" link in filelist is
hardcoded. Add a label to make it translatable.

Resolves: #60410
Releases: 6.3, 6.2
Change-Id: Id618dfcd96ae3b4558cf9d529e0cc7c3ae220f9a
Reviewed-on: http://review.typo3.org/31772
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[TASK] Keep the changes to PackageStates.php low

Introduce a sort operation of the packages before determining
the loading order.
This way the number of changes made to the PackageStates.php file
are reduced.

This is only a first step, further improvements have to be made
to finally resolve #56362.

Resolves: #56362
Releases: 6.3, 6.2
Change-Id: Id6cc4cc2d3f4d9f00e90f355bdede1afe20f57af
Reviewed-on: http://review.typo3.org/31774
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
[BUGFIX] Turn isOnSymmetricSide into static function

Function isOnSymmetricSide of RelationHandler is used as
static function all the time so we properly turn the function
declaration into a static one.

Resolves: #60516
Releases: 6.3, 6.2
Change-Id: I72a922596e69dca26e173dad5b42da76e0949865
Reviewed-on: http://review.typo3.org/31748
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>
(cherry picked from commit 0674579840c2785323cba9d3e860c768f875ddf3)
Reviewed-on: http://review.typo3.org/31777
[BUGFIX] Make call to isPackageKeyValid non-static

Function isPackagKeyValid on PackageManeger is not a static function
and must be called on an object instance.

Resolves: #59619
Releases: 6.3, 6.2
Change-Id: I03b068db00ccdf76b6e8658721e630b7de6ebfd8
Reviewed-on: http://review.typo3.org/31778
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[TASK] Add wrapper for GeneralUtility::getIndpEnv in ContentObjectRenderer

A wrapper function for GeneralUtility::getIndpEnv() is required
to mock these static calls in unit tests.

Resolves: #60549
Releases: 6.3, 6.2
Change-Id: I47b565f5a5bd9b2445847d38447c01cfa20954c7
Reviewed-on: http://review.typo3.org/31792
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>