summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php2
-rw-r--r--lib/private/Collaboration/Collaborators/Search.php5
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php4
-rw-r--r--lib/private/Log/ErrorHandler.php6
4 files changed, 10 insertions, 7 deletions
diff --git a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php
index 6c65ee8b2c6..28f322f42b7 100644
--- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php
+++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php
@@ -71,7 +71,7 @@ class AdditionalScriptsMiddleware extends Middleware {
$isLoggedIn = false;
}
- $this->dispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($isLoggedIn));
+ $this->dispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($isLoggedIn, $response));
}
return $response;
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php
index 1aabd423371..e7773858e5c 100644
--- a/lib/private/Collaboration/Collaborators/Search.php
+++ b/lib/private/Collaboration/Collaborators/Search.php
@@ -91,9 +91,10 @@ class Search implements ISearch {
$searchResult->unsetResult($emailType);
}
- // if we have an exact local user match, there is no need to show the remote and email matches
+ // if we have an exact local user match with an email-a-like query,
+ // there is no need to show the remote and email matches.
$userType = new SearchResultType('users');
- if ($searchResult->hasExactIdMatch($userType)) {
+ if (strpos($search, '@') !== false && $searchResult->hasExactIdMatch($userType)) {
$searchResult->unsetResult($remoteType);
$searchResult->unsetResult($emailType);
}
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index 13e914367d7..2d21c6a16f7 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -147,9 +147,9 @@ class UserPlugin implements ISearchPlugin {
if (
- strtolower($uid) === $lowerSearch ||
+ $lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
strtolower($userDisplayName) === $lowerSearch ||
- strtolower($userEmail) === $lowerSearch
+ strtolower($userEmail) === $lowerSearch)
) {
if (strtolower($uid) === $lowerSearch) {
$foundUserById = true;
diff --git a/lib/private/Log/ErrorHandler.php b/lib/private/Log/ErrorHandler.php
index d37af8212a0..e87da0b5d83 100644
--- a/lib/private/Log/ErrorHandler.php
+++ b/lib/private/Log/ErrorHandler.php
@@ -88,12 +88,14 @@ class ErrorHandler {
return;
}
$msg = $message . ' at ' . $file . '#' . $line;
- self::$logger->error(self::removePassword($msg), ['app' => 'PHP']);
+ $e = new \Error(self::removePassword($msg));
+ self::$logger->logException($e, ['app' => 'PHP']);
}
//Recoverable handler which catch all errors, warnings and notices
public static function onAll($number, $message, $file, $line) {
$msg = $message . ' at ' . $file . '#' . $line;
- self::$logger->debug(self::removePassword($msg), ['app' => 'PHP']);
+ $e = new \Error(self::removePassword($msg));
+ self::$logger->logException($e, ['app' => 'PHP', 'level' => 0]);
}
}