From 2f27d58dfea06485abbb772297bcd875fe6779da Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 6 Jan 2014 19:43:54 -0800 Subject: filestorage re-org and cleanup --- mod/filestorage.php | 6 ++++-- view/tpl/attach_edit.tpl | 9 ++++++++- view/tpl/filestorage.tpl | 9 ++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/mod/filestorage.php b/mod/filestorage.php index 4fa3c4182..b774cf756 100644 --- a/mod/filestorage.php +++ b/mod/filestorage.php @@ -93,7 +93,7 @@ function filestorage_content(&$a) { } $file = intval(argv(2)); - $r = q("select id, folder, filename, flags, hash, allow_cid, allow_gid, deny_cid, deny_gid from attach where id = %d and uid = %d limit 1", + $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", intval($file), intval($owner) ); @@ -117,6 +117,7 @@ function filestorage_content(&$a) { '$recurse' => t('Include all files and sub folders'), '$backlink' => t('Return to file list'), '$isadir' => $is_a_dir, + '$cpdesc' => t('Copy/paste this code to attach file to a post'), '$submit' => t('Submit') )); @@ -156,10 +157,11 @@ function filestorage_content(&$a) { '$download' => t('Download'), '$files' => $files, '$channel' => $which, - '$edit' => t('Edit Permissions'), + '$edit' => t('Edit'), '$delete' => t('Delete'), '$used' => $used, '$usedlabel' => t('Used: '), + '$directory' => t('[directory]'), '$limit' => $limit, '$limitlabel' => t('Limit: '), )); diff --git a/view/tpl/attach_edit.tpl b/view/tpl/attach_edit.tpl index 1483336ff..fa6f8914f 100644 --- a/view/tpl/attach_edit.tpl +++ b/view/tpl/attach_edit.tpl @@ -14,11 +14,18 @@ + {{if $isadir}}
+{{else}} +
{{$cpdesc}}
+ {{/if}}
@@ -26,7 +33,7 @@
- + diff --git a/view/tpl/filestorage.tpl b/view/tpl/filestorage.tpl index 0089f7918..7b88c6440 100644 --- a/view/tpl/filestorage.tpl +++ b/view/tpl/filestorage.tpl @@ -7,11 +7,10 @@ {{foreach $files as $key => $items}} {{foreach $items as $item}}
- {{$edit}} | - {{$delete}} | - [attachment]{{$item.download}},{{$item.rev}}[/attachment] | - {{if ! $item.dir}}{{/if}}{{$item.title}}{{if ! $item.dir}}{{/if}} | - {{$item.size}} bytes + {{$edit}}   | + {{$delete}} |    + {{if ! $item.dir}}{{/if}}{{$item.title}}{{if ! $item.dir}}{{/if}} + {{if ! $item.dir}} | {{$item.size}} bytes{{else}}{{$directory}}{{/if}}
{{/foreach}} -- cgit v1.2.3