]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix full text search for groupfolders 16083/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:46:25 +0000 (19:46 +0000)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/Files/View.php
lib/private/Share20/Manager.php

index 990bd07e59c4b0675244cf2e689b871e6d7efc68..b7027d8d753c4bd9f6fe14019aad768615ccfc83 100644 (file)
@@ -1925,7 +1925,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,
@@ -1966,7 +1966,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 73fc04c7cc9670a96fea6776c3b7f278938036b8..8ca6185d08c913b706fd9dba98fa19b66358d9d0 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();
                }