adding share owner information to the file list

This commit is contained in:
Thomas Müller 2014-01-30 11:18:46 +01:00 committed by Vincent Petry
parent 5cc4a47f4c
commit 7c68025010
2 changed files with 8 additions and 5 deletions

View file

@ -34,16 +34,16 @@ $totalsize = 0; ?>
<span class="nametext">
<?php print_unescaped(htmlspecialchars($file['name']));?>
</span>
<span class="uploadtext" currentUploads="0">
</span>
<?php else: ?>
<a class="name" href="<?php p(rtrim($_['downloadURL'],'/').'/'.trim($directory,'/').'/'.$name); ?>">
<label class="filetext" title="" for="select-<?php p($file['fileid']); ?>"></label>
<span class="nametext"><?php print_unescaped(htmlspecialchars($file['basename']));?><span class='extension'><?php p($file['extension']);?></span></span>
</a>
<?php endif; ?>
<?php if($file['type'] == 'dir'):?>
<span class="uploadtext" currentUploads="0">
</span>
<?php endif;?>
<?php if(isset($file['displayname_owner'])): ?>
<span class="share-info"><?php p($l->t('shared by %s', array($file['displayname_owner']))) ?></span>
<?php endif; ?>
</a>
</td>
<td class="filesize"

View file

@ -94,6 +94,9 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
$file['mtime'] = $item['mtime'];
$file['encrypted'] = $item['encrypted'];
$file['etag'] = $item['etag'];
$file['uid_owner'] = $item['uid_owner'];
$file['displayname_owner'] = $item['displayname_owner'];
$storage = \OC\Files\Filesystem::getStorage('/');
$cache = $storage->getCache();
if ($item['encrypted'] or ($item['unencrypted_size'] > 0 and $cache->getMimetype($item['mimetype']) === 'httpd/unix-directory')) {