summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/helper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index b84b6c06d30..be0992b1985 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -37,6 +37,7 @@ class Helper
public static function determineIcon($file) {
if($file['type'] === 'dir') {
$icon = \OC_Helper::mimetypeIcon('dir');
+ // TODO: move this part to the client side, using mountType
if ($file->isShared()) {
$icon = \OC_Helper::mimetypeIcon('dir-shared');
} elseif ($file->isMounted()) {
@@ -125,6 +126,18 @@ class Helper
if (isset($i['is_share_mount_point'])) {
$entry['isShareMountPoint'] = $i['is_share_mount_point'];
}
+ $mountType = null;
+ if ($i->isShared()) {
+ $mountType = 'shared';
+ } else if ($i->isMounted()) {
+ $mountType = 'external';
+ }
+ if ($mountType !== null) {
+ if ($i->getInternalPath() === '') {
+ $mountType .= '-root';
+ }
+ $entry['mountType'] = $mountType;
+ }
return $entry;
}