summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-03-23 11:57:34 +0100
committerGitHub <noreply@github.com>2017-03-23 11:57:34 +0100
commit1f210bf2738ce54f9194d03550f59b15405ddf41 (patch)
tree24203b323070bea9a5da04a76edd2f7238acc83a /apps
parent9675bbd830d47ab7581b8b30b95d5253599e3db4 (diff)
parentfb87aa61e7154acbdcc5f93fed0331bd3c4da990 (diff)
downloadnextcloud-server-1f210bf2738ce54f9194d03550f59b15405ddf41.tar.gz
nextcloud-server-1f210bf2738ce54f9194d03550f59b15405ddf41.zip
Merge pull request #3948 from nextcloud/downstream-27271
Tooltip in trashbin with previous location
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/Helper.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php
index 9c312443164..a309d533e54 100644
--- a/apps/files_trashbin/lib/Helper.php
+++ b/apps/files_trashbin/lib/Helper.php
@@ -72,8 +72,9 @@ class Helper {
$timestamp = substr(pathinfo($parts[0], PATHINFO_EXTENSION), 1);
}
$originalPath = '';
- if (isset($originalLocations[$id][$timestamp])) {
- $originalPath = $originalLocations[$id][$timestamp];
+ $originalName = substr($entryName, 0, -strlen($timestamp)-2);
+ if (isset($originalLocations[$originalName][$timestamp])) {
+ $originalPath = $originalLocations[$originalName][$timestamp];
if (substr($originalPath, -1) === '/') {
$originalPath = substr($originalPath, 0, -1);
}
@@ -90,7 +91,11 @@ class Helper {
'permissions' => Constants::PERMISSION_ALL - Constants::PERMISSION_SHARE
);
if ($originalPath) {
- $i['extraData'] = $originalPath . '/' . $id;
+ if ($originalPath !== '.') {
+ $i['extraData'] = $originalPath . '/' . $originalName;
+ } else {
+ $i['extraData'] = $originalName;
+ }
}
$result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount);
}