fix in displayNamesInGroup: when specified limit N, we did complex search only in the first N users
Use afterBind to send fileId header for files and directories

afterBind is called for both files and directories and is now used to
send the OC-FileId headers.
change logic in displayNamesInGroup and add some unit tests
Append port to trusted domain in case it's not 80 or 443

Ref https://github.com/owncloud/core/pull/10584#issuecomment-54677059
Move select2 from files_external to core
Now using select2 for the groups excluded from sharing
Load select2 on admin page
Remove excludegroup.php

The ajax call is now using ajax/appconfig.php instead
Added select2 on the apps page

Moved setupGroupsSelect() from admin.js to a common settings.js
as OC.Settings.setupGoupsSelect().

Now using select2 as well on the apps page.
Fixed select2 for admin and apps page

Added explicit escaping.
Now internally using a pipe symbol as separator for select2, to make it
possible to use group names containing commas.
fit select2 to ownCloud input style
Add select2 cache for complete group list

To avoid making a server request every time the dropdown opens, the
whole list of groups are cached (from the last request):

Whenever the user types in a search term it will still send server
requests.
add more logic in displayNamesInGroup for big user bases
1. remove sizeof($filteredUsers) > 0 as condition
2. use count instead of sizeof. Latter is an alias to first one, practically we stick to count everywhere. Having it consistent helps with readability.
3. move whitespace so we have $groupUsers[] = $filteredUser; instead of $groupUsers []= $filteredUser;
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.
Match more URL fragments

Fixes https://github.com/owncloud/core/pull/11009#issuecomment-56103341
create backup from all keys before recovery
make sure that we really catch the files folder only
Throw error in showPreview instead the constructor

This function is also used in a way such as:

```
	$preview = new \OC\Preview(\OC_User::getUser(), 'files');
	$info = \OC\Files\Filesystem::getFileInfo($file);
	if (!$always and !$preview->isAvailable($info)) {
		\OC_Response::setStatus(404);
	} else {
		$preview->setFile($file);
		$preview->setMaxX($maxX);
		$preview->setMaxY($maxY);
		$preview->setScalingUp($scalingUp);
		$preview->setKeepAspect($keepAspect);
	}
```

Which won't work anymore since `setFile` is used instead of passing the file in the constructor. Fixes a regression in master.
Merge pull request #11171 from owncloud/fix-route

Match more URL fragments