[TASK] Add a function for clearing the rootline caches

The RootlineUtility uses two local caches and one additional cache from
the caching framework. If a unit test uses the RootlineUtility, it needs
a way of purging these caches so it does not change the environment.

Resolves: #58763
Releases: 6.3, 6.2, 6.1
Change-Id: Ia9878b808acfa03f018086829f90b84d4c5e8512
Reviewed-on: https://review.typo3.org/31200
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Gifbuilder: Fix image-mask-functionality

Mask-functionality is broken since the
introduction of FAL.

Change-Id: Iff28d9561e10f7581041bcc35bd56dfc972954b3
Resolves: #59392
Releases: 6.3, 6.2, 6.1
Reviewed-on: https://review.typo3.org/31202
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Reset phpunit to 3.7 version

Some 6.1 tests do not work with phpunit 4.0 and above.
Instead of fixing them in 6.1 branch, we use a ext:phpunit
version that bundles phpunit 3.7.

Releases: 6.1
Resolves: #59978
Change-Id: If2d9173ef964a2f71428c495c2ac5c5171025f9c
Reviewed-on: https://review.typo3.org/31215
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Improve travis notifications to channels

By default travis notifies on each build when
posting to channels (irc, slack)
We can reduce the number of notifications by only
posting successful builds when it previously failed.
Additionally encrypt the API token for posting to slack.

Releases: 6.3, 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I882d34903c972201454e6cc5b9041393e3bd3661
Reviewed-on: https://review.typo3.org/31222
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Fix unit tests after latest PHP changes

Latest changes in PHP disallow unserialize on
certain internal classes. Since phpunit uses
unserialize to create objects of such classes
when requesting a mock without calling the constructor
these tests failed with a PHP fatal error.

Instead of skipping the tests, we can simply provide
mocked constructor arguments (if required) so that
phpunit can create a mock object by using the new operator
and passing these mocked constructor arguments.

Change-Id: I26aa06125581b4ca93abcbad2ebb98003509e81a
Resolves: #59979
Related: #59685
Releases: 6.1
Reviewed-on: https://review.typo3.org/31221
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Create workspace label placeholder that matches field conditions

If a workspace placeholder record is generated the field, that
is configured as label for a table, is filled with a placeholder.
This is a hardcoded string.
If database field does not allow strings (integer, double...)
a TYPO3 warning is displayed. "... Propably value mismatch ...".
This message is very confusing because the user does not know
where it comes from.

The label should be evaluated against the TCA eval configuration
before it is written to the database.

Resolves: #31757
Releases: 6.3, 6.2, 6.1
Change-Id: I18261359550dcaddaa9bd9ca0dd77f8300e81da9
Reviewed-on: https://review.typo3.org/31284
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Fix usergroup condition in user TSconfig

usergroup conditions in user TSconfig are currently failing as
the list of groups the user is part of, is not yet compiled when
the TSconfig is evaluated.

This can be fixed by moving the group evaluation some lines upwards,
as this does not influence the remaining code.

Resolves: #59813
Releases: 6.3, 6.2, 6.1
Change-Id: Id3189ea5cd31936bdf538e2bb163ecc2d46ed6a0
Reviewed-on: https://review.typo3.org/31152
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Remove non-needed URL parameter for standard search

Removes parameter to prevent duplicate content, speaking
url problems and overloaded urls.

Resolves: #51189
Releases: 6.3, 6.2, 6.1
Change-Id: I076d2f87ac7a1d0d9d831cf3293d060318750c7d
Reviewed-on: https://review.typo3.org/31420
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Suggest wizard doesn't work in page flexforms

When using the suggest wizard from within a flexform in a page it
doesn't work properly. The $row variable was only set when processing
tables other than pages but is required for proper flexform handling.

Change-Id: I0eec29b3c7266bae809e2753cdee726a4c50b1ab
Resolves: #59642
Releases: 6.3, 6.2, 6.1
Reviewed-on: https://review.typo3.org/31422
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Wrong image reference handling during flexform copying

References in flexforms having type=inline are not processed correctly
during copy.

Fix this by properly applying the reference field check.

Resolves: #59664
Releases: 6.3, 6.2, 6.1
Change-Id: I1abfa001ba420531ca0c59903e82b1509e0819e0
Reviewed-on: https://review.typo3.org/31426
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Set internalUploadMap on upload in ExtendedFileUtility

Since introducing FAL the internalUploadMap array in
ExtendedFileUtility was not set on uploading files.

Resolves: #58463
Releases: 6.2, 6.1, 6.0
Change-Id: I4a537a57f1b688c26c20b9f68356a4be67bc5851
Reviewed-on: https://review.typo3.org/29885
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
[BUGFIX] TCA: handle select renderMode=tree with minitems=1 AND maxitems=1

Using the TCA select renderMode=tree with the option
minitems=1 AND maxitems=1
leads to two bugs since TYPO3 4.5:

First #48943
* A new table entry won't mark the field selection as required. The yellow
  question mark is missing and you can save the entry.
* Once you select a checkbox in the tree and unselect it again, the
  required-check is working.

Second: #31637
* You load an existing table entry with a selection of e.g. a category
  which has been hidden or deleted. The selected checkbox won't be shown,
  but the required-check fails.
* Even worse: You can't select another category as the form thinks you
  have already selected one item (maxitem=1). You can fix this only by
  manipulating the database directly.

The reason for these bugs can be found in
DataPreprocessor::renderRecord_selectProc(). For maxitems = 1 the
foreign_table element ids for the tree will be fetched by getDataIdList().
These elements won't be checked whether they are valid (hidden/deleted).
This check is done in selectAddForeign() which is used for maxitems > 1.

The patch uses the same procedure as for maxitems > 1 in case
of renderMode = tree.

Resolves: #48943
Resolves: #31637
Releases: 6.3, 6.2, 6.1
Change-Id: I078ff524ea73951f2121d2c233a46bc2ae562952
Reviewed-on: https://review.typo3.org/31481
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Movements pollute colPos value of content elements

Due to commit I148ca1b023226f2f99417b3baf238b72346e721f the information
concerning previous and next content elements in one row is messed up.
This patch helps to build information which depends on colPos again and
prevents records being moved to another column.

Resolves: #48939
Resolves: #49055
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I3a15321ee11a1f7d96b58b8b7a5ab14098664b22
Reviewed-on: https://review.typo3.org/31493
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[RELEASE] Release of TYPO3 6.1.10

Change-Id: I73a5e72ee9cad630ea2d2ee50d115d4a8d7310f0
Reviewed-on: https://review.typo3.org/31510
Reviewed-by: TYPO3 Release Team
Tested-by: TYPO3 Release Team
[TASK] Set TYPO3 version to 6.1.11-dev

Change-Id: Ie4ae5a728eecb0522e2937b685ed8704b3dd7cff
Reviewed-on: https://review.typo3.org/31511
Reviewed-by: TYPO3 Release Team
Tested-by: TYPO3 Release Team
[BUGFIX] Too many tags by identifier in CacheBackends

This applies to Apc/Memcached/Wincache/Xcache backends.

After an array_merge the values aren't unique. This leads to duplicate
tags per identifier. This patch changes that and also moves the
findTagsByIdentifier call out of the foreach loop.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: Id31e16fa4bba11038ba692a483fb9a33808d95fa
Reviewed-on: https://review.typo3.org/31519
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Followup to CacheBackend patch

Re-add a missing use statement that vanished during rebase.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: I16ac1b9d5a00c4300202eaef493de43fc988a81d
Reviewed-on: https://review.typo3.org/31522
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[!!!][BUGFIX] Content Object instances are reused

The ContentObjectRenderer creates instances for each content
object to be rendered, e.g. TEXT, COA, CONTENT, etc. However,
these instances are re-used and therefore we introduced work
arounds since serialization of FLUIDTEMPLATE failed back then.
If dealing with nested record sets using RECORDS or CONTENT,
reusing objects might be tricky since the parent pointer to the
ContentObjectRenderer might be wrong and strange things happen.

This patch removes the pseudo singleton approach since the
objects are not state-less and might lead to unexpected
results in rare cases.

Resolves: #55941
Releases: 6.2
Change-Id: I043a31403c05b87e1591f0e0237effa21bf93c98
Reviewed-on: https://review.typo3.org/27586
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[FEATURE] Introduce MM_oppositeUsage property

On copying a sys_category record, a new MM reference is created,
however without setting the "fieldname". This value is basically
defined from the opposite entity with MM_match_fields, but
cannot be accessed.

This change introduces the MM_oppositeUsage property for MM
definitions in the TCA.

Example:
'config' => array(
  'allowed' => '*',
  'MM' => 'tx_myextension_first_second_mm',
  'MM_oppositeUsage' => array(
    'tt_content' => array('somefield'),
    'tx_myextension_domain_model' => array('some_property'),
  ),
),

Resolves: #56061
Documentation: #56123
Releases: 6.2
Change-Id: I26fd54688cf44d6a026ccdb3ca9276583b32acd3
Reviewed-on: https://review.typo3.org/27677
Reviewed-by: Wouter Wolters
Reviewed-by: Ernesto Baschny
Tested-by: Wouter Wolters
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
[BUGFIX] Use MM_oppositeUsage for category relations

The MM_oppositeUsage property allows to apply match fields
of the opposite relation to MM records. This feature shall
be enabled for sys_category records as well.

Resolves: #56122
Related: #56061
Releases: 6.2
Change-Id: I33c9f3c471d66c4154be5c2fb5180254401096f0
Reviewed-on: https://review.typo3.org/27731
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader