always use the correct share type
if it is not a folder share the path already points to the correct file
Merge pull request #11691 from owncloud/fix_pub_link_creation

fix target creation for public links
guess mimetype on touch

Conflicts:
	apps/files_external/lib/amazons3.php
Lazy initialize external storages

Backport of 075e8d8e8658913e1c5b8869f3e457fa6db2d847 from master
Backport of #11702

set up FS by username, not login name\!

better variable name
Fix S3 connection
Merge pull request #11719 from owncloud/stable7-fix-s3-regression

[stable7] Fix S3 connection regression
Make files non executable

There is not much sense in having these files marked executable, we should avoid that.
Make supported DBs configurable within config.php

This commit will make the supported DBs for installation configurable within config.php. By default the following databases are tested: "sqlite", "mysql", "pgsql". The reason behind this is that there might be instances where we want to prevent SQLite to be used by mistake.

To test this play around with the new configuration parameter "supportedDatabases".

Conflicts:
	lib/private/util.php
Introduce cross-db ILIKE

adding ILIKE to AdapterSQLSrv

add test case for ILIKE with wildcard

Make sqlite LIKE case sensitive on default

Implement ILIKE for sqlite

Use ILIKE in cache search

Fix ILIKE without wildcards for oracle
Properly catch 503 storage not available in getQuotaInfo

When doing a PROPFIND on the root and one of the mount points is not
available, the returned quota attributes will now be zero.

This fix prevents the expected exception to make the whole call fail.

Backport of 21d825ed6c11425d36a143f8ed63f1e3852d0aeb from master
Merge pull request #11800 from owncloud/backport-MakeSupportedDBsConfigurable

Make supported DBs configurable within config.php
Merge pull request #11802 from owncloud/backport-10958

Backport #10958
Show login again instead of JSON if CSRF check fails

Previously a JSON error page was shown to the user in-case the CSRF token was not valid. This was confusing and prevented people from login.

With this at least the login page is shown again and not a JSON error message. I consider this as sufficient since adding a new error page just for this sake would uneededly make lib/base.php even more cluttered and this is a edge-case which optimally should anyways not happen that often.

This can be tested by opening the login page, then clearing the cookies, and trying to login.
Close session for avatar get

This somehow blocked the "Users" UI for me when having a lot of users. - Shouldn't hurt here.
Close session for search

Make search non-blocking.
Fix moving share keys as non-owner to subdir

This fix gathers the share keys BEFORE a file is moved to make sure that
findShareKeys() is able to find all relevant keys when the file still
exists.

After the move/copy operation the keys are moved/copied to the target
dir.

Also: refactored preRename and preCopy into a single function to avoid
duplicate code.
Fix warning with unset extension check
Added encryption test when moving file as non-owner