[CLEANUP] Remove useless CSS file in EXT:documentation

Releases: 6.2
Resolves: #50728
Change-Id: I2de2182d094b8e8eb5373c38f57e20331ea3d4d6
Reviewed-on: https://review.typo3.org/22763
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
[BUGFIX] MySQL: Use ENGINE (not TYPE) for storage-engine

Using TYPE is deprecated since a MySQL 4.x and was removed in MySQL
5.5. Core already uses ENGINE but SqlParser turned that into TYPE,
leading to errors.

From https://dev.mysql.com/doc/refman/5.0/en/storage-engines.html:
"The older term TYPE is supported as a synonym for ENGINE for
backward compatibility, but ENGINE is the preferred term and TYPE
is deprecated."

Change-Id: I6607d3e726c43cb74ca00f33ec2332de4f6a76d8
Resolves: #50466
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/22592
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] ControllerExtensionName can not be resolved in CLI mode

This fixes the resolution of the controllerExtensionName in CLI
context.

Change-Id: Ic0363a4e1b055aff813ddf8620403df5a4fa872f
Resolves: #49288
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/22410
Reviewed-by: Ingo Pfennigstorf
Tested-by: Ingo Pfennigstorf
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[FEATURE] Find best-matching local storage instead of default-storage

If no storage-UID is given usually the default-storage will be
used ("legacy-storage"). Some problems with not up-to-date
index-records etc. can be prevented by using a matching storage
instead of falling back to the default-storage (ID 0).

Implement search for best matching storage.

Resolves: #45498
Releases: 6.2
Change-Id: Ife00d68314fe43804227bb26280d0d475cbaf10b
Reviewed-on: https://review.typo3.org/18290
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[BUGFIX] FAL: Image Processing doesn't respect GFX "thumbnails_png"

The Task Interface of the File Abstraction Layer defines the
target file extension for graphcal tasks. Previously this was done
with the option "thumbnails_png" from the TYPO3_CONF_VARS.

However, checking for that parameter is not done anymore within
FAL/AbstractGraphicalTask. Thus, all .gif images are shown as .png
files, even though TYPO3 is not configured like that.

This can be seen when using GM, thumbnails_png=0, and creating
a preview image of an animated GIF. The preview will not be shown
for some images then.

The patch introduces the existing option back in to 6.x/FAL.

Releases: 6.2, 6.1, 6.0
Resolves: #50193
Change-Id: Ie539fe1aa1ab7366129a156be8ce9b05a5f8d5d2
Reviewed-on: https://review.typo3.org/22420
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
[TASK] Cleanup update wizard in Install Tool

Cleanup the update wizard classes and move all
classes to one folder instead of the two that
are used now.

Change-Id: Id6a000fe75892d1596984954b2b2f8a78eaf0483
Resolves: #50670
Releases: 6.2
Reviewed-on: https://review.typo3.org/22754
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Fatal error: "enableFields on non-object" in extension manager

Don't rely on $TSFE object to detect if we are in a frontend context. Rely
on TYPO3_MODE constant instead.

Releases: 6.2, 6.1, 6.0
Resolves: #50803
Change-Id: I06ea2692dab7683c7284e5f3ff45036d72c64999
Reviewed-on: https://review.typo3.org/22830
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Fix empty href parameter

In case the link target is not available (maybe hidden), the behaviour
known from the Core is to render the link text, but no a tag. The pageVH
renders the link, but the href parameter will be empty.

Resolves: #50751
Releases: 6.2, 6.1, 6.0
Change-Id: I526aa0e3d42f8aba867b3f996bac2366dc1f6d19
Reviewed-on: https://review.typo3.org/22789
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Fix failing test in StorageRepositoryTest

With #50803 the usage of the constant TYPO3_MODE was introduced. This
leads to the failing test, after the constant can not be redefined
for test purposes.

To work around this, a method that can be mocked is introduced, and
specifically set to "FE" for this test to work again.

Resolves: #50809
Relates: #50803
Releases: 6.2, 6.1, 6.0
Change-Id: I7319d8ccef530feff69a7f9885df24dba0beed4d
Reviewed-on: https://review.typo3.org/22836
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
[BUGFIX] MySQLi: Allow persistent connections again

For a persistent connection the hostname needs to be
prefixed with "p:". This was already prepared in the
code, however that variable was not yet used.

Change-Id: I01e20fd69239d0772ca9b371af0058316541f2a9
Resolves: #50781
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/22813
Reviewed-by: Philipp Gampe
Tested-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK] Use magic __CLASS__ in getInstance()-methods

Some classes contain static getInstance()-methods that return
an instance of themselves. Instead of using the correct namespace
and classname everywhere, just use __CLASS__.

Change-Id: I22770505acded0c54b07dd0e239976ad01fdf893
Resolves: #50615
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22741
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Incorrect check for empty folder

The condition in ResourceStorage::deleteFolder is wrong.
Negate the isFolderEmpty() clause.

Resolves: #50125
Releases: 6.2, 6.1, 6.0
Change-Id: Ia60f3e97ff8d1e0cc2671cec1b31cfc995c235b1
Reviewed-on: https://review.typo3.org/22674
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Use proper implementation of a wordwrap

The page module uses a custom implementation of a wordwrap
as this was not supported by the browser in those earlier days.

The big drawback is that there is no UTF8 support for this which
leads to empty preview boxes when e.g. using Japanese.

Change-Id: I7caab8e14a9a0b7ccbd38c692b0cf98635967567
Resolves: #15797
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/22840
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Fix EmConfUtility::fixEmConf conflicts generation

EmConfUtility::fixEmConf generates a string instead
of an array for "$emConf['constraints']['conflicts']"

Resolves: #50628
Releases: 6.2, 6.1, 6.0
Change-Id: I37e026569e761b8550a9b0e6a1cb10835f6c899b
Reviewed-on: https://review.typo3.org/22746
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Load documentation extension by default

The documentation extension should be loaded by default for new
websites and should be suggested in Install Tool when upgrading.

Resolves: #50536
Releases: 6.2
Change-Id: I97755b96cf0ccce849e986650d5deca37cde294a
Reviewed-on: https://review.typo3.org/22668
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[FEATURE] Adds register values to FilesContentObj

Adds FILE_NUM_CURRENT and FILES_COUNT to the register
for each file.

Use case:
10 = FILES
10 {
	references {
		table = tt_news
		uid.field = uid
		fieldName = media
	}
	renderObj = COA
	renderObj {
		10 = TEXT
		10.value = Render first file two times
		10.if.isFalse.data = register:FILE_NUM_CURRENT
		20 = TEXT
		20.value = file {register:FILE_NUM_CURRENT} of {register:FILES_COUNT}
		20.insertData = 1
	}
}

Resolves: #49480
Releases: 6.2
Change-Id: I3eca404210ee21f73cea0860fa0be7cc39b4632f
Reviewed-on: https://review.typo3.org/21747
Reviewed-by: Lars Peipmann
Tested-by: Lars Peipmann
Tested-by: Wouter Wolters
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Test in Configuration\ConfigurationManagerTest fails in backend

When running the tests in the PHPUnit backend, the path of the current
working directory is typo3/ (where mod.php is included). Therefore the
test canWriteConfigurationReturnsTrueIfDirectoryAndFilesAreWritable
fails as it deals with paths relative to the root directory. We have to
use absolute paths to ensure files in typo3temp folder exist.

Resolves: #50845
Releases: 6.2, 6.1
Change-Id: I7859978c31cf523c8803316fdac8c067d00042cc
Reviewed-on: https://review.typo3.org/22896
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] PHP warning in ext:documentation

PHP warning will be thrown if typo3conf/Documentation
does not exists. Add a check to prevent the warning.

Change-Id: Ia9def8bb5b36da888eba3817ded9b348f48c37a3
Resolves: #50841
Releases: 6.2
Reviewed-on: https://review.typo3.org/22893
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Backup singletons in unit tests prior to other setUp operations

If the singleton management is changed in unit tests, a local copy of
the previous stage is done to re-construct this state in tearDown().
This has to be done before any other instantiation in setUp() is
initiated which might register additional singletons.

Resolves: #50812
Releases: 6.2, 6.1, 6.0
Change-Id: I7788a5788aca6777040b777aeceb0558f96022b2
Reviewed-on: https://review.typo3.org/22838
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
[BUGFIX] Failing tests in Resource\Driver\LocalDriverTest on Windows

The test createdFilesAreEmpty depends on another test which returns a
mocked object. In the mock two returnValues for getIdentifier() and
getName() were set. But due to PHPUnit architecture mocked functions
belong to the test there were defined and cannot be shared. This is why
the mock has to be initialized within the test itself. The test only
works because on unix system you can open a folder which returns an
empty string.

Furthermore if you use any php function to get a folder path we have to
fix the containing backslashes.

Finally due to some errors we have to rewind any iterator of class
RecursiveIteratorIterator as otherwise a wrong index is returned.

Resolves: #50844
Releases: 6.2, 6.1, 6.0
Change-Id: I13f9efbd1618056fcd66220e3de5e12af79e4dc6
Reviewed-on: https://review.typo3.org/22895
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn