[BUGFIX] Fix RewriteRule for context to avoid HTTP 500

The affected rules are those for TYPO3_CONTEXT.
These rules should just set the ENV variable,
but should not touch the URL.
According to apache httpd docs this has to be
indicated by using a dash.

Also unnecessary grouping in the regexp has been
removed.

Resolves: #59037
Releases: 6.3, 6.2
Change-Id: I56cadcfb3cfae0a0ee679c6886cda9f5498fc47c
Reviewed-on: https://review.typo3.org/30328
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Armin Ruediger Vieweg
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Update Travis CI notification settings

Notify on Slack and IRC, remove email notification.

Resolves: #59838
Releases: 6.3, 6.2, 4.5
Change-Id: Ic4dacd5c7b6b4e6e2b8cfa92ae7976b666209747
Reviewed-on: https://review.typo3.org/31104
Reviewed-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Add more files in gitignore file

Whenever running the Functional Tests
directly from the Core, the framework requires
some additional folders that can be added
to the gitignore file.

More info about Functional Testing:
http://wiki.typo3.org/Functional_testing

Change-Id: If51851f32ebeda0eb6829dc3f16d87709904824a
Releases: 6.3, 6.2
Resolves: #59514
Reviewed-on: https://review.typo3.org/30683
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[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/31114
Reviewed-by: Martin Wiederkehr
Tested-by: Martin Wiederkehr
Reviewed-by: Christoph Buchli
Tested-by: Christoph Buchli
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Use stable phpunit 4.1 instead of master

We had to update to phpunit "master" recently due to an issue with
phpunit-mock-objects that was not released yet but fixed in master.
The fix was released with phpunit-mock-objects 2.1.5 today, so we
can switch back to a stable combination of those packages.

Resolves: #59958
Related: #59685
Releases: 6.3, 6.2
Change-Id: I92336adef0291239c7dad606002721c91b2991fa
Reviewed-on: https://review.typo3.org/31179
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] BE shortcuts do not show up for editors

Due to some wrong or missing checks the link to create a shortcut
to a create new record form misses the correct name of the
"motherModName" as a result the shortcut links are not rendered
for non-admins. For admins these links do not work if PHP notices
are transformed to exceptions.

Resolves: #59946
Releases: 6.3, 6.2
Change-Id: I9acd74fd5dfefea62badc79e42e380466ce6c497
Reviewed-on: https://review.typo3.org/31172
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Marcin Sągol
[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/30052
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/30610
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Fix insufficient mocking in ContentObjectRenderer

Resolves: #59967
Releases: 6.3, 6.2
Change-Id: Ie30b8e522f9045c7cd6cbe9c032413c0ad936b1a
Reviewed-on: https://review.typo3.org/31205
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[CLEANUP] main_rte function of the ElementBrowser

It splits 450 lines function into smaller pieces
and removes some duplicated code in the process.
It also opens a way to further duplicate removal
e.g. the code for selecting current folder.
This patch is not changing functionality,
just moving code around.

* splits main_rte into smaller chunks
* make main_rte method signature be consistent
  between class implementations and usage
* removes ~100 lines of duplicated code
  getPageSelectorHtml and getFileSelectorHtml
  are now inherited in the BrowseLinks
* removed few "@todo Define visibility" for methods
  which are called from outside

Resolves: #56781
Releases: 6.3
Change-Id: I7679017b1e215ea2d4da46fa30314313bc9980c5
Reviewed-on: https://review.typo3.org/28269
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[BUGFIX] Create required directories in test bootstrap

When running the core unit tests without setting up TYPO3
using the normal installation procedure then the uploads,
typo3temp, and typo3conf/ext directories do not exist.

Resolves: #59977
Releases: 6.3,6.2
Change-Id: Ib6b8ecd480b83cf818f54d865a4ff61fe62d2893
Reviewed-on: https://review.typo3.org/31216
Reviewed-by: Oliver Klee
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[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/31218
Reviewed-by: Michael Stucki
Tested-by: Michael Stucki
[BUGFIX] Enable skipped tests by properly creating mocks

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.

Releases: 6.3, 6.2
Resolves: #59981
Related: #59685
Change-Id: Ibd3b9aee0376a5043e053cffa6c88f7b93c86e18
Reviewed-on: https://review.typo3.org/31228
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[CLEANUP] Remove redundant code in Persistence

The getPlainValue method is consolidated in the DataMapper.

Resolves: #57255
Releases: 6.3
Change-Id: Ic35fd2768a1431f260c99d6faf8ad4e0a1754ea3
Reviewed-on: https://review.typo3.org/28576
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Rebuild the calcAge functionality

We have two calcAge functions with same functionality and same issues.
So this is moved to a new DateTimeUtility class and deprecated in the
the original classes. Also time functions from GeneralUtility are moved
to the new class.

Following issues are resolved:
* Age calculation does not respect leap years.
* Age calculation may round up so something seams older than it is.
* Between days and years there are months missing, so we get now 2 months
  instead of 60 days.

Resolves: #20016
Releases: 6.3, 6.2
Change-Id: Ie323f30b1fb97b68f89d43605ccda67f219a965a
Reviewed-on: https://review.typo3.org/24635
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Remove TCA building aspect and move code to bootstrap

The patch moves the slot code that implements the override loading
logic back to the bootstrap but keeps the signal.

Resolves: #59770
Related: #59414
Related: #59468
Releases: 6.3, 6.2
Change-Id: Ib4691eaa94f258ebd96f2609fb267cadc8356090
Reviewed-on: https://review.typo3.org/31007
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Frans Saris
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[CLEANUP] Improve code style of DatabaseRecordList

* adjust docheaders
* improve readability by introducing linebreaks
* use typesafe comparison where possible
* remove unnessessary full qualified class names

Resolves: #58293
Releases: 6.3
Change-Id: Iae277008d6baeb63304c2fb4a5d057019c5de9fc
Reviewed-on: https://review.typo3.org/29708
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[TASK] Add extension key to API

Instead of relying on a "magic" global $_EXTKEY
being set, add a new parameter to API where
this was used beforehand.

Resolves: #59770
Releases: 6.2, 6.3
Change-Id: I531bb6067d79aa42c9c592e88f3564dc7f40b29d
Reviewed-on: https://review.typo3.org/31233
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Revert "[TASK] Rebuild the calcAge functionality"

This change was considered to need some more work during
mrge post review:

* 6.2 version adds not allowed deprecations to a released branch
* It adds two arbitrary (public) constants CEIL and FLOOR
* Method names need improvement
* Violation of single responsibility
* The static utility class has dependencies
* The patch adds another "always loaded" file to main bootstrap
* Undocumented (minor) breaking changes
* (Minor) code style issues

Reverted: #20016
Releases: 6.3, 6.2

This reverts commit 98c0ff7144a67ce8780a1b1ebe55749b6909e202
Change-Id: I7b07f2176eae78f6000db685c0f54164d5040202
Reviewed-on: https://review.typo3.org/31236
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] Unique IDs for pagetree root nodes

To make sure that every ID in the pagetree is unique in pagetrees
with a virtual root node (which is used for normal editors) the
page UIDs of the webmounts are set in the mountpoint property of
the tree nodes. This makes sure that all tree node ids are unique.

Resolves: #57163
Releases: 6.3, 6.2
Change-Id: Ia938a9bf4839524d60056d55c0186196dbd11289
Reviewed-on: https://review.typo3.org/28616
Reviewed-by: Markus Klein
Tested-by: Markus Klein