diff options
author | Robin Appelman <robin@icewind.nl> | 2016-12-13 14:53:38 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-12-13 14:53:38 +0300 |
commit | 14a561ddad8bbd6ae1d524a49c70a7926c06310f (patch) | |
tree | db08cea1ebdd0e7ea5b80fd77269e03efb7652bc | |
parent | 86473306f350cc426ce01009f6f6e2b4a57df38b (diff) |
always use numeric storage id in cacheentry
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/Files/Cache/Cache.php | 6 | ||||
-rw-r--r-- | lib/private/Files/Cache/CacheEntry.php | 2 | ||||
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 859d79f88d4..a966d621c58 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -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) { diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index 784bd3a6f98..4a2579a88f8 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -62,7 +62,7 @@ class CacheEntry implements ICacheEntry, \ArrayAccess { } public function getStorageId() { - return $this->data['storage_id']; + return $this->data['storage']; } diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 7a602950171..fded7442d20 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -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())); } |