aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-06-25 08:38:54 +1000
committerRedMatrix <info@friendica.com>2014-06-25 08:38:54 +1000
commit44abcd83b34611ca0857cd37c76aa06742e0bd54 (patch)
tree19084efb8cc9023eea10b750af9fc7db8b64e851
parentfa1dc7aba2cc5bd4a37e1ab74c971d2d3afacf01 (diff)
parenta6403905ef51194c09b5c63983ea9be9455dfc96 (diff)
downloadvolse-hubzilla-44abcd83b34611ca0857cd37c76aa06742e0bd54.tar.gz
volse-hubzilla-44abcd83b34611ca0857cd37c76aa06742e0bd54.tar.bz2
volse-hubzilla-44abcd83b34611ca0857cd37c76aa06742e0bd54.zip
Merge pull request #506 from dawnbreak/master
Set backlink to the parent folder, not cloud's root.
-rw-r--r--mod/filestorage.php2
-rw-r--r--view/tpl/attach_edit.tpl2
2 files changed, 3 insertions, 1 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php
index 6a7eac706..383af84fc 100644
--- a/mod/filestorage.php
+++ b/mod/filestorage.php
@@ -110,6 +110,7 @@ function filestorage_content(&$a) {
$channel = $a->get_channel();
$cloudpath = get_cloudpath($f) . (($f['flags'] & ATTACH_FLAG_DIR) ? '?f=&davguest=1' : '');
+ $parentpath = get_parent_cloudpath($channel['channel_id'], $channel['channel_address'], $f['hash']);
$aclselect_e = populate_acl($f,false);
$is_a_dir = (($f['flags'] & ATTACH_FLAG_DIR) ? true : false);
@@ -121,6 +122,7 @@ function filestorage_content(&$a) {
'$header' => t('Edit file permissions'),
'$file' => $f,
'$cloudpath' => z_root() . '/' . $cloudpath,
+ '$parentpath' => $parentpath,
'$uid' => $channel['channel_id'],
'$channelnick' => $channel['channel_address'],
'$permissions' => t('Permissions'),
diff --git a/view/tpl/attach_edit.tpl b/view/tpl/attach_edit.tpl
index 0d3d2c571..e91b4c0c6 100644
--- a/view/tpl/attach_edit.tpl
+++ b/view/tpl/attach_edit.tpl
@@ -1,4 +1,4 @@
-<div id="attach-edit-backlink">< <a href="cloud/{{$channelnick}}">{{$backlink}}</a></div>
+<div id="attach-edit-backlink">< <a href="{{$parentpath}}">{{$backlink}}</a></div>
<h1>{{$header}}</h1>