create backup from all keys before recovery
Merge pull request #11207 from owncloud/enc_create_backup_on_recovery_oc6

create backup from all keys before recovery (oc6 backport)
Added extra check to avoid deleting key folders

Whenever a delete operation is called twice in a row, it could happen
that the first call already deleted the file.

The second call would return an empty $ownerPath because the file does
not exist. That empty $ownerPath would run the key deletion operation on
the wrong path.

This fix adds checks in many places to make sure we don't use $ownerPath
when it's empty or null.

Backport of 8aca127e52f965871bea82cb27c6ea103baf34bb from master
Add a configuration switch for enabled preview mimetypes

Backport of https://github.com/owncloud/core/pull/11211 to stable6
first check if a private key exists, if not it is always a recovery szenario
Use non-empty defaults
Reenable file proxy when renaming between mount points

When moving a folder into another mount point, $renamedFiles is empty
because that goes over a different mechanism.

In such case, this fix makes sure that the file proxy is reenable to
avoid breaking the subsequent files that are being moved.
Merge branch 'stable6' into backport-11211-stable6

Conflicts:
	config/config.sample.php
Merge pull request #11246 from owncloud/backport-11211-stable6

Add a configuration switch for enabled preview mimetypes
Clarify possible preview providers for type Office

a

Conflicts:
	lib/private/preview.php
fix case insensitive search on oracle and postgresql
on oracle use regex_like
on postgres use ILIKE
add unit test to check case insensitivity