]> source.dussan.org Git - nextcloud-server.git/commitdiff
only check for external mount points if the external storage app is enabled
authorBjörn Schießle <schiessle@owncloud.com>
Tue, 25 Jun 2013 15:46:04 +0000 (17:46 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 5 Jul 2013 14:00:34 +0000 (16:00 +0200)
apps/files_encryption/lib/util.php

index 00b3192db8f5bbf05fce97f4c006b14f7626d137..50e823585d76aa5d7ba3d42cc207ddea9912dd01 100644 (file)
@@ -1027,11 +1027,12 @@ class Util {
                }
 
                // check if it is a group mount
-               $mount = \OC_Mount_Config::getSystemMountPoints();
-               foreach ($mount as $mountPoint => $data) {
-                       if ($mountPoint == substr($ownerPath, 1, strlen($mountPoint))) {
-                               $userIds = array_merge($userIds,
-                                       $this->getUserWithAccessToMountPoint($data['applicable']['users'], $data['applicable']['groups']));
+               if (\OCP\App::isEnabled("files_external")) {
+                       $mount = \OC_Mount_Config::getSystemMountPoints();
+                       foreach ($mount as $mountPoint => $data) {
+                               if ($mountPoint == substr($ownerPath, 1, strlen($mountPoint))) {
+                                       $userIds = array_merge($userIds, $this->getUserWithAccessToMountPoint($data['applicable']['users'], $data['applicable']['groups']));
+                               }
                        }
                }
 
@@ -1567,10 +1568,12 @@ class Util {
         * @return boolean
         */
        public function isSystemWideMountPoint($path) {
-               $mount = \OC_Mount_Config::getSystemMountPoints();
-               foreach ($mount as $mountPoint => $data) {
-                       if ($mountPoint == substr($path, 1, strlen($mountPoint))) {
-                               return true;
+               if (\OCP\App::isEnabled("files_external")) {
+                       $mount = \OC_Mount_Config::getSystemMountPoints();
+                       foreach ($mount as $mountPoint => $data) {
+                               if ($mountPoint == substr($path, 1, strlen($mountPoint))) {
+                                       return true;
+                               }
                        }
                }
                return false;