aboutsummaryrefslogtreecommitdiffstats
path: root/mod/filestorage.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-09 21:01:53 -0800
committerfriendica <info@friendica.com>2014-01-09 21:01:53 -0800
commitee2bea37e9a46e8dcd6b7df655fc56c1feb8132e (patch)
tree45a5e250f06f1eda3c0249c1784754721fed81a0 /mod/filestorage.php
parenta309bc0d478f5335853ed0cb7a0f0bfe41110643 (diff)
downloadvolse-hubzilla-ee2bea37e9a46e8dcd6b7df655fc56c1feb8132e.tar.gz
volse-hubzilla-ee2bea37e9a46e8dcd6b7df655fc56c1feb8132e.tar.bz2
volse-hubzilla-ee2bea37e9a46e8dcd6b7df655fc56c1feb8132e.zip
mod_filestorage: provide a URL for linking to webpages and other websites
Diffstat (limited to 'mod/filestorage.php')
-rw-r--r--mod/filestorage.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php
index 43ea17789..3e87dccb8 100644
--- a/mod/filestorage.php
+++ b/mod/filestorage.php
@@ -101,7 +101,7 @@ function filestorage_content(&$a) {
}
$file = intval(argv(2));
- $r = q("select id, folder, filename, revision, flags, hash, allow_cid, allow_gid, deny_cid, deny_gid from attach where id = %d and uid = %d limit 1",
+ $r = q("select id, uid, folder, filename, revision, flags, hash, allow_cid, allow_gid, deny_cid, deny_gid from attach where id = %d and uid = %d limit 1",
intval($file),
intval($owner)
);
@@ -110,6 +110,7 @@ function filestorage_content(&$a) {
$channel = $a->get_channel();
+ $cloudpath = get_cloudpath($f);
$aclselect_e = populate_acl($f);
$is_a_dir = (($f['flags'] & ATTACH_FLAG_DIR) ? true : false);
@@ -118,6 +119,7 @@ function filestorage_content(&$a) {
$o = replace_macros(get_markup_template('attach_edit.tpl'), array(
'$header' => t('Edit file permissions'),
'$file' => $f,
+ '$cloudpath' => z_root() . '/' . $cloudpath,
'$uid' => $channel['channel_id'],
'$channelnick' => $channel['channel_address'],
'$permissions' => t('Permissions'),
@@ -126,6 +128,7 @@ function filestorage_content(&$a) {
'$backlink' => t('Return to file list'),
'$isadir' => $is_a_dir,
'$cpdesc' => t('Copy/paste this code to attach file to a post'),
+ '$cpldesc' => t('Copy/paste this URL to link file from a web page'),
'$submit' => t('Submit')
));