aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/app.php11
-rw-r--r--apps/files/lib/helper.php6
2 files changed, 6 insertions, 11 deletions
diff --git a/apps/files/lib/app.php b/apps/files/lib/app.php
index adfca669577..ed4aa32c662 100644
--- a/apps/files/lib/app.php
+++ b/apps/files/lib/app.php
@@ -54,13 +54,8 @@ class App {
'data' => NULL
);
- // rename to "/Shared" is denied
- if( $dir === '/' and $newname === 'Shared' ) {
- $result['data'] = array(
- 'message' => $this->l10n->t("Invalid folder name. Usage of 'Shared' is reserved.")
- );
// rename to non-existing folder is denied
- } else if (!$this->view->file_exists($dir)) {
+ if (!$this->view->file_exists($dir)) {
$result['data'] = array('message' => (string)$this->l10n->t(
'The target folder has been moved or deleted.',
array($dir)),
@@ -68,7 +63,7 @@ class App {
);
// rename to existing file is denied
} else if ($this->view->file_exists($dir . '/' . $newname)) {
-
+
$result['data'] = array(
'message' => $this->l10n->t(
"The name %s is already used in the folder %s. Please choose a different name.",
@@ -77,8 +72,6 @@ class App {
} else if (
// rename to "." is denied
$newname !== '.' and
- // rename of "/Shared" is denied
- !($dir === '/' and $oldname === 'Shared') and
// THEN try to rename
$this->view->rename($dir . '/' . $oldname, $dir . '/' . $newname)
) {
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index 2e3741cbdca..0ae87d12fbf 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -37,8 +37,7 @@ class Helper
$sid = explode(':', $sid);
if ($sid[0] === 'shared') {
$icon = \OC_Helper::mimetypeIcon('dir-shared');
- }
- if ($sid[0] !== 'local' and $sid[0] !== 'home') {
+ } elseif ($sid[0] !== 'local' and $sid[0] !== 'home') {
$icon = \OC_Helper::mimetypeIcon('dir-external');
}
}
@@ -97,6 +96,9 @@ class Helper
if (isset($i['displayname_owner'])) {
$entry['shareOwner'] = $i['displayname_owner'];
}
+ if (isset($i['is_share_mount_point'])) {
+ $entry['isShareMountPoint'] = $i['is_share_mount_point'];
+ }
return $entry;
}