aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-19 10:46:02 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-19 10:46:02 +0100
commit1331de554c0ab619df1826424e502803535481e2 (patch)
tree3b511eb10bba476bbf89b6b290ad8874d956830b /lib/private/files/cache
parente517e642befa119b77521a2e15571ee6932046ad (diff)
downloadnextcloud-server-1331de554c0ab619df1826424e502803535481e2.tar.gz
nextcloud-server-1331de554c0ab619df1826424e502803535481e2.zip
Reuse the folder id in View->getFolderContents
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/cache.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 4cab4619149..dbdc42ecc48 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -162,10 +162,13 @@ class Cache {
* get the metadata of all files stored in $folder
*
* @param string $folder
+ * @param int $fileId (optional) the file id of the folder
* @return array
*/
- public function getFolderContents($folder) {
- $fileId = $this->getId($folder);
+ public function getFolderContents($folder, $fileId = null) {
+ if (is_null($fileId)) {
+ $fileId = $this->getId($folder);
+ }
if ($fileId > -1) {
$sql = 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`,
`storage_mtime`, `encrypted`, `unencrypted_size`, `etag`