Only populate tags in main file list

Moved populateTags to be done on the main file list.
This prevents the public file list to go through the same code and cause
an error when there is no user.
remotes/origin/fix-10825
Vincent Petry 12 years ago
parent 10a0fc2856
commit 4b1b93507d
  1. 1
      apps/files/ajax/list.php
  2. 1
      apps/files/lib/helper.php

@ -26,6 +26,7 @@ try {
// make filelist
$files = \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection);
$files = \OCA\Files\Helper::populateTags($files);
$data['directory'] = $dir;
$data['files'] = \OCA\Files\Helper::formatFileInfos($files);
$data['permissions'] = $permissions;

@ -174,7 +174,6 @@ class Helper
*/
public static function getFiles($dir, $sortAttribute = 'name', $sortDescending = false) {
$content = \OC\Files\Filesystem::getDirectoryContent($dir);
$content = self::populateTags($content);
return self::sortFiles($content, $sortAttribute, $sortDescending);
}

Loading…
Cancel
Save