Migrate Google Drive storage app to v1.0.0 of the client library
files_external/3rdparty: update google-api-php-client to 1.0.2-beta
fix a bug in google-api-php-client: generates an auth url that doesn't work

Submitted upstream as https://github.com/google/google-api-php-client/issues/76
Google's php lib has a function to generate a URL for OAuth2 authentication.
It uses http_build_query() to generate the query part of the URL, and in PHP
5.3 or later, this uses an encoded ampersand - &amp; - as the query separator,
not a raw one. However, Google's OAuth server apparently can't handle encoded
ampersands as separators and so it fails.

This patch explicitly sets a raw ampersand as the separator. If Google decides
to fix their OAuth server instead of merging this patch into google-api-php-
client, we can drop this patch as soon as that happens.
google drive: set access type to 'offline' when requesting token

We need to do this in order to be able to refresh the access token without
prompting the user for their credentials every hour. This was the default
in 0.6 of the Google library, but needs to be explicitly specified in 1.0.
bump google lib to c6949531d2 (post 1.0.3-beta, including query separator fix)

This is the upstream commit that merged my query separator fix. It's slightly
after the 1.0.3-beta tag. I eyeballed the other post 1.0.3-beta changes and
none of them looks like any kind of problem, so we may as well just use this
upstream state.
scrutinizer fix: correct @return for getDriveFile()
scrutinizer fix: explicitly declare Google class property $client
update google-api-php-client to 1.0.6-beta

Latest version with various bugfixes, also implements support
for using curl instead of its own io class when available; this
avoids the bug that causes severe excess bandwidth use due to
some kind of zlib issue.
google: disable compression when curl is not available

This is a slightly hacky workaround for
https://github.com/google/google-api-php-client/issues/59 .
There's a bug in the Google library which makes it go nuts on
file uploads and transfer *way* too much data if compression is
enabled and it's using its own IO handler (not curl). Upstream
'fixed' this (by disabling compression) for one upload
mechanism, but not for the one we use. The bug doesn't seem to
happen if the google lib detects that curl is available and
decides to use it instead of its own handler. So, let's disable
compression, but only if it looks like the Google lib's check
for curl is going to fail.
Deprecate older API wrappers and calls

Those old classes have now non-static pendants and can be deprecated IMHO.
Remove phpass and migrate to new Hasher interface

This PR removes phpass and migrates to the new Hasher interface.

Please notice that due to https://github.com/owncloud/core/issues/10671 old hashes are not updated but the hashes are backwards compatible so this shouldn't hurt.
Once the sharing classes have a possibility to update the passwords of single shares those methods should be used within the newHash if block.
Added function to load translations from JS

For apps that support async translation loading, a new function
OC.L10N.load() can be used to asynchronously load the translations
for a given app.
Ignore port for trusted domains

This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)

Fixes https://github.com/owncloud/core/issues/12150 and https://github.com/owncloud/core/issues/12123 and also a problem reported by @DeepDiver1975.

Conflicts:
	lib/private/request.php
Add repair steps for legacy config files

Remove all ports from the trusted domains

Conflicts:
	lib/private/repair.php
	lib/repair/repairconfig.php
Fix case-sensitivity
Don't disclose relative directory path for single shared files of user

The "dir" key is used within the public sharing template to indicate in which directory the user currently is when sharing a directory with subdirectories. This is needed by the JS scripts.

However, when not accessing a directory then "dir" was set to the relative path of the file (from the user's home directory), meaning that for every public shared file the sharee can see the path.
(For example if you share the file "foo.txt" from "finances/topsecret/" the sharee would still see the path "finances/topsecret/" from the shared HTML template)

This is not the excpected behaviour and can be considered a privacy problem, this patch addresses this by setting "dir" to an empty key.
Remove unused variable and make Scrutinizer happy.
Remove stray generateUrl
add postfix

add postfix
replace all static calls to OC_Config and OC_Preferences to calls to OCP\IConfig