]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix full text search for groupfolders 16082/head
authorMorris Jobke <hey@morrisjobke.de>
Fri, 31 May 2019 21:16:06 +0000 (23:16 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 25 Jun 2019 19:45:27 +0000 (19:45 +0000)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/Files/View.php
lib/private/Share20/Manager.php

index fef6153fb9ac0fa8aa2b7a55caecaed38257ed7d..7e177b269d14cde0271c9704d6ebc55baa190ea1 100644 (file)
@@ -1928,7 +1928,7 @@ class View {
                if ($mount) {
                        try {
                                $storage = $mount->getStorage();
-                               if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+                               if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
                                        $storage->acquireLock(
                                                $mount->getInternalPath($absolutePath),
                                                $type,
@@ -1969,7 +1969,7 @@ class View {
                if ($mount) {
                        try {
                                $storage = $mount->getStorage();
-                               if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
+                               if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) {
                                        $storage->changeLock(
                                                $mount->getInternalPath($absolutePath),
                                                $type,
index c2ea165955f34cde3d6cb20f9bb053622da4c373..18fefc021fa8da85eff92faeed611fb90add2477 100644 (file)
@@ -1430,6 +1430,9 @@ class Manager implements IManager {
                if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
                        $nodes = $userFolder->getById($path->getId());
                        $path = array_shift($nodes);
+                       if ($path->getOwner() === null) {
+                               return [];
+                       }
                        $owner = $path->getOwner()->getUID();
                }