add partial file data to the result of Cache::get

remotes/origin/stable5
Robin Appelman 14 years ago
parent 93292516d9
commit 153cd802a9
  1. 8
      lib/files/cache/cache.php

@ -31,7 +31,13 @@ class Cache {
$query = \OC_DB::prepare(
'SELECT `id`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`, `size`, `mtime`
FROM `*PREFIX*filecache` ' . $where);
$result=$query->execute($params);
$result = $query->execute($params);
//merge partial data
$key = $file->getStorageId() . '::' . $file->getInternalPath();
if (isset(self::$partial[$key])) {
$result=array_merge($result, self::$partial[$key]);
}
return $result->fetchRow();
}

Loading…
Cancel
Save