[BUGFIX] fallbackRendering is always called

When rendering textpic, the content object rendering is always called for
the Typoscript setting fallbackRendering which is not always defined.

Change-Id: I2ebfffd2ece8022136c4fcc8d0e12d552486dd32
Fixes: #44732
Releases: 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/17661
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK][EM] More readable "time since last update"-strings

The extensionmanager now shows the time elapsed since the last update,
not the time of the last update. The time of the last update is still
shown in a tooltip. Some english localizations have changed.

Resolves: #46524
Related: #39921
Releases: 6.1
Change-Id: I2d5c6e8099e6973826debfcf2cbb597c35bb499c
Reviewed-on: https://review.typo3.org/19116
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Warning empty $GLOBALS['TCA'] in rootline utility

The TCA refactoring of issue #45767 introduced a warning in the
rootline utility: Rootline resolving is called by determineID in
index_ts. At this point in bootstrap the TCA was not loaded yet.
The patch just moves the TCA includes prior to determineID.

Warning: This leads to an earlier execution of ext_tables.php if
caches are empty. 6.0 did that too, it called includeTca()
in RootlineUtility to circumvent the same issue, the current patch
just solves the issue in a cleaner way. But still, this might lead
to problems if ext_tables.php code relies for example on the setup
done by determineID or the other code in between. The risk this
breaks something is pretty low, though.

Change-Id: I83e6367dbb4654fe0bf957bbe817fa6d5b5ea106
Resolves: #46156
Related: #45767
Releases: 6.1
Reviewed-on: https://review.typo3.org/19200
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK][EM] Truncate table if updating extension list

If updating the TER extension list, em deletes all rows of the table
with entries of the specific repository. Since EM handles the main
repository only, truncate can be used here, which is quicker.

Change-Id: Id0dc4fb57d68346f372c44d8cbee247072d09548
Resolves: #46569
Releases: 6.1
Reviewed-on: https://review.typo3.org/19199
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Context menu for offline storages raises exception

If you try to call the context menu for an offline storage an exception is
raised. Therefore an offline storage shouldn't be linked with a context
menu.

Change-Id: I2845d173bd2a22c96e23bb58bf1a57239109829a
Fixes: #46551
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19181
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] Title includes html tags

In the filelist special folders like _temp_ and _recycler_ folder are
highlighted in bold as they get human readable names. The <strong>
tags are shown in the title tag as well. Therefore the title tag has
to be stripped of any html tags.

Change-Id: I4b21a916851e0d02aa58971eabda32f813bd890c
Fixes: #46532
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19167
Reviewed-by: Fabien Udriot
Reviewed-by: Michael Staatz
Reviewed-by: Oliver Klee
Tested-by: Michael Staatz
Reviewed-by: Wouter Wolters
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX][EM] Fix of last update time after update

The time of the last update in the extension manager was not displayed
correctly immediately after an update, an additional refresh was needed.

Fixes: #46573
Releases: 6.1
Change-Id: I51b0c966ddb3dda522cc68573d440e24273e96bc
Reviewed-on: https://review.typo3.org/19202
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX][EM] Fix failing unit tests

Change-Id: I2a100ba46e4b3c3177848ed554ea74f2d2b8dc52
Fixes: #46588
Related: #46573
Releases: 6.1
Reviewed-on: https://review.typo3.org/19208
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Copy and move folders between storages is broken

If you try to copy a folder from one storage into another one it leads to
a copy in the same (source) storage. This happens because the action is
executed in the source storage and only works with the source folder
object. This is fixed by calling the move method on the target storage
instead.

Besides the copyFolderBetweenStorages function raises an exception which
might be moved into the driver class as the driver should be responsible
for the copy work. Therefore the AbstractDriver should support
(abstract) methods to copy a folder between storages and the local
driver should raises the exception.

Same applies for moving folders between storages.

Change-Id: Ib282e351f39abca21d57f5d621b4bd999f8419d9
Fixes: #46564
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19194
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] Settings for local drivers are not shown by default

If you create a new storage the LocalDriver is selected by default
(because it is the first registered driver) but the flexform field is not
shown. Because of the hidden configuration field you cannot set up the
base path until you have saved the storage record. Local driver should be
selected by default and configuration field should be displayed every
time.

Change-Id: Ic9c6c1eb7ca3d9f45723dce728558002440ae9da
Fixes: #46555
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19187
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] FAL Upgrade Wizards do not set pid

The sys_file_reference records are originally set to
be placed on rootLevel, the upgrade wizard does
exactly that.

However, the concept in this case is flawed
- When creating new sys_file_reference records via IRRE,
   the sys_file_reference is stored on the page
- When copying moving e.g. a tt_content record, all its
   child elements are placed on that new page as
   well (so this works)
- rootLevel restriction is not needed in this case

The patch does the following:
- Modify the existing upgrade wizard to place the
   sys_file_references on the pages of the foreign
   tables (tt_content pid)
- the rootLevel flag for sys_file_reference is removed
- Add a new upgrade wizard is added to ensure the
integrity of the sys-file-reference pids

Releases: 6.1, 6.0
Resolves: #46497
Change-Id: I2ee435907c6381becd29664e901b1bd8fd62174a
Reviewed-on: https://review.typo3.org/19130
Reviewed-by: Henrik Ziegenhain
Reviewed-by: Simon Schick
Reviewed-by: Michael Staatz
Tested-by: Michael Staatz
Tested-by: Henrik Ziegenhain
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[TASK] Remove unneeded backupGlobals from Unit Tests

Change-Id: Ib15d118cd28a455fb5125fc51580382ad72d1d26
Resolves: #46593
Releases: 6.1
Reviewed-on: https://review.typo3.org/19215
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Remove old require_once in index_ts.php

* TimeTracker can be instantiated directly, using autoloader
* Check for loaded ext:cms is obsolete, it is a required extension

Change-Id: Ifd6ab21c7ec3aa1c25c5ef0bf4da8f7a76478a2b
Fixes: #46599
Releases: 6.1
Reviewed-on: https://review.typo3.org/19220
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[FEATURE] Use EnvironmentService to detect TYPO3_MODE in several places

In several places the TYPO3_MODE is still detected by
checking the TYPO3_MODE constant directly. This patch
replaces the checks by using the EnvironmentService.

Releases: 6.1
Resolves: #46396
Change-Id: I2f58e1ca175a86845beb053440428cc42f093847
Reviewed-on: https://review.typo3.org/19006
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Subfolders must use the identifier as identifier

Currently subfolders don't use the identifier correctly as the name is
used instead. This doesn't really matter if you got a folder structure
anyway but dealing with different identifiers leads to troubles.

createFolderObject() will create a new Folder object which then has the
identifier set wrong.

Change-Id: I04629ffc97766557abc0920f1dbe56f1453d76ac
Fixes: #46568
Releases: 6.1,6.0
Reviewed-on: https://review.typo3.org/19198
Reviewed-by: Tom Ruether
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
[BUG] sys_file_reference: missing exclude fields for Non-Admins

Currently, only link, but not description and alternative
is a exclude field. So the others are ALWAYS visible.
They need to be adjusted as well.

Releases: 6.1
Resolves: #43939
Change-Id: I47ed483c81dc354ad3d8f13ad1029c77c920a0e4
Reviewed-on: https://review.typo3.org/19207
Reviewed-by: Felix Nagel
Tested-by: Felix Nagel
Reviewed-by: Tom Ruether
Tested-by: Tom Ruether
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] Folder Tree does not respect _temp_ and _recycler_

The Folder Tree View does not respect temp and
recycler settings, which are identified by the folder
names.

The file list itself does that, because there is a wrong
use of "getIdentifier".

You can see that the foldertree does not show
"Temporary" but "_temp_"  because the comparison
fails every time. The file list works however.

Resolves: #46603
Releases: 6.1, 6.0
Change-Id: I08de29b737ef3464addceda9f610e9dd0a7b1034
Reviewed-on: https://review.typo3.org/19222
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Felix Nagel
Tested-by: Felix Nagel
Reviewed-by: Tom Ruether
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] Resource storage does not emit signals

The ResourceStorage class should emit signals before and after most
actions it performs. The emit*() methods are already there, but not
called from the "action" methods. This commit adds the calls where
missing.

Change-Id: Icf1653975aa72762ab61c6d649207c5900e66b1d
Resolves: #46587
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19221
Reviewed-by: Alexander Opitz
Reviewed-by: Wouter Wolters
Reviewed-by: Tom Ruether
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[FEATURE] Add delete button in file list

Currently it is not possible to delete a file or folder
in the file list. Additionally, there is translation and
error handling missing. The patch adds the trash
icon to the file list (if the user has the right) and
adds error and success messages.

Releases: 6.1, 6.0
Resolves: #44288
Change-Id: I0f5be642054819a4f01c5e70590e1da455b92af6
Reviewed-on: https://review.typo3.org/19155
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
[BUGFIX] Default upload folder should be user_upload/

The default folder in FAL is set to temp. However, temp should
be used for temporary files like import/export t3d files,
not uploads by the user.
In 99% of the use case, the uploaded files should be accessible
by the frontend (which temp isn't because of a .htaccess file).
That's why the fileadmin/user_upload/ should always be
created in the install tool, AND the user_upload file
should be the default folder for the local driver.

Resolves: #46604
Releases: 6.1, 6.0
Change-Id: I79319bab4bad76c1af9e001a0a5146fae85ce59f
Reviewed-on: https://review.typo3.org/19223
Reviewed-by: Wouter Wolters
Reviewed-by: Tom Ruether
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf