]> source.dussan.org Git - nextcloud-server.git/commitdiff
always use numeric storage id in cacheentry 2637/head
authorRobin Appelman <robin@icewind.nl>
Tue, 13 Dec 2016 11:53:38 +0000 (12:53 +0100)
committerRobin Appelman <robin@icewind.nl>
Tue, 13 Dec 2016 11:53:38 +0000 (12:53 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Cache/Cache.php
lib/private/Files/Cache/CacheEntry.php
lib/private/Share20/DefaultShareProvider.php

index 859d79f88d47102196fa4c4203a8066ed4c93175..a966d621c58d4e617c461b2545b24ff1e250a0af 100644 (file)
@@ -142,7 +142,7 @@ class Cache implements ICache {
                        }
                        return $data;
                } else {
-                       return self::cacheEntryFromData($data, $this->storageId, $this->mimetypeLoader);
+                       return self::cacheEntryFromData($data, $this->mimetypeLoader);
                }
        }
 
@@ -150,11 +150,10 @@ class Cache implements ICache {
         * Create a CacheEntry from database row
         *
         * @param array $data
-        * @param string $storageId
         * @param IMimeTypeLoader $mimetypeLoader
         * @return CacheEntry
         */
-       public static function cacheEntryFromData($data, $storageId, IMimeTypeLoader $mimetypeLoader) {
+       public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader) {
                //fix types
                $data['fileid'] = (int)$data['fileid'];
                $data['parent'] = (int)$data['parent'];
@@ -164,7 +163,6 @@ class Cache implements ICache {
                $data['encryptedVersion'] = (int)$data['encrypted'];
                $data['encrypted'] = (bool)$data['encrypted'];
                $data['storage_id'] = $data['storage'];
-               $data['storage'] = $storageId;
                $data['mimetype'] = $mimetypeLoader->getMimetypeById($data['mimetype']);
                $data['mimepart'] = $mimetypeLoader->getMimetypeById($data['mimepart']);
                if ($data['storage_mtime'] == 0) {
index 784bd3a6f980a83b42dcd4139f6777fc7784040e..4a2579a88f89aa2be8aa34b73862727de5079b02 100644 (file)
@@ -62,7 +62,7 @@ class CacheEntry implements ICacheEntry, \ArrayAccess {
        }
 
        public function getStorageId() {
-               return $this->data['storage_id'];
+               return $this->data['storage'];
        }
 
 
index 7a60295017104004d2ff8c63df09c7f49502e82b..fded7442d20cfabc0eef1cb4f04eda914dcc526b 100644 (file)
@@ -853,7 +853,6 @@ class DefaultShareProvider implements IShareProvider {
                        $entryData['permissions'] = $entryData['f_permissions'];
                        $entryData['parent'] = $entryData['f_parent'];;
                        $share->setNodeCacheEntry(Cache::cacheEntryFromData($entryData,
-                               $entryData['storage_string_id'],
                                \OC::$server->getMimeTypeLoader()));
                }