diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-18 19:32:24 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-18 19:32:24 -0400 |
commit | d1aebcddf26c155c4efa580d19bb99c0e51ecbba (patch) | |
tree | 1165c856c9f1213593437c9ed84461a11112d9b0 /files | |
parent | 498356fcb85198fd447f112268bb2bb769c05089 (diff) | |
download | nextcloud-server-d1aebcddf26c155c4efa580d19bb99c0e51ecbba.tar.gz nextcloud-server-d1aebcddf26c155c4efa580d19bb99c0e51ecbba.zip |
Add downloadURL to files templates for both public links and files
Diffstat (limited to 'files')
-rw-r--r-- | files/index.php | 5 | ||||
-rw-r--r-- | files/templates/part.breadcrumb.php | 2 | ||||
-rw-r--r-- | files/templates/part.list.php | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/files/index.php b/files/index.php index 5ab74a6267b..e62c9246448 100644 --- a/files/index.php +++ b/files/index.php @@ -69,10 +69,11 @@ foreach( explode( "/", $dir ) as $i ){ // make breadcrumb und filelist markup $list = new OC_Template( "files", "part.list", "" ); $list->assign( "files", $files ); -$list->assign( "baseUrl", OC_Helper::linkTo("files", "index.php?")); +$list->assign( "baseURL", OC_Helper::linkTo("files", "index.php?dir=")); +$list->assign( "downloadURL", OC_Helper::linkTo("files", "download.php?file=")); $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); -$breadcrumbNav->assign( "baseUrl", OC_Helper::linkTo("files", "index.php?")); +$breadcrumbNav->assign( "baseURL", OC_Helper::linkTo("files", "index.php?dir=")); $maxUploadFilesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize')); diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php index c4f75bf86b8..9a265a9c1ea 100644 --- a/files/templates/part.breadcrumb.php +++ b/files/templates/part.breadcrumb.php @@ -1,5 +1,5 @@ <?php foreach($_["breadcrumb"] as $crumb): ?> <div class="crumb svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'> - <a href="<?php echo $_['baseUrl']."dir=".$crumb["dir"]; ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> + <a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> </div> <?php endforeach; ?> diff --git a/files/templates/part.list.php b/files/templates/part.list.php index b6f586443db..0484f90c268 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -9,7 +9,7 @@ <tr data-file="<?php echo $file['name'];?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mime']?>" data-size='<?php echo $file['size'];?>'> <td class="filename svg" style="background-image:url(<?php if($file['type'] == 'dir') echo mimetype_icon('dir'); else echo mimetype_icon($file['mime']); ?>)"> <input type="checkbox" /> - <a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseUrl'].'dir='.$file['directory'].'/'.$file['name']; else echo link_to('files', 'download.php?file='.$file['directory'].'/'.$file['name']); ?>" title=""> + <a class="name" href="<?php if($file['type'] == 'dir') echo $_['baseURL'].$file['directory'].'/'.$file['name']; else echo $_['downloadURL'].$file['directory'].'/'.$file['name']; ?>" title=""> <span class="nametext"> <?php if($file['type'] == 'dir'):?> <?php echo htmlspecialchars($file['name']);?> |