summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-27 11:58:02 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-27 11:58:02 +0200
commit0120f3fd629e772d9a7493e5289c1d6708ba92d5 (patch)
treedbee6eba6d11afe887a6235375119b7a6bd71b69 /apps/files
parent74665faec533430be37879bfc0ef24aa7f211f6e (diff)
parentbeaaf5425dc2dfb7456efa934fa8eb91ac28c677 (diff)
downloadnextcloud-server-0120f3fd629e772d9a7493e5289c1d6708ba92d5.tar.gz
nextcloud-server-0120f3fd629e772d9a7493e5289c1d6708ba92d5.zip
Merge branch 'routing'
Conflicts: core/lostpassword/index.php core/lostpassword/resetpassword.php
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/appinfo/routes.php12
-rw-r--r--apps/files/index.php4
-rw-r--r--apps/files/js/fileactions.js2
-rw-r--r--apps/files/js/filelist.js2
4 files changed, 16 insertions, 4 deletions
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
new file mode 100644
index 00000000000..e1ab560803d
--- /dev/null
+++ b/apps/files/appinfo/routes.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+$this->create('download', 'download{file}')
+ ->requirements(array('file' => '.*'))
+ ->actionInclude('files/download.php');
+
diff --git a/apps/files/index.php b/apps/files/index.php
index 92fda5b21e5..3441e371a31 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -75,11 +75,11 @@ foreach( explode( '/', $dir ) as $i ) {
// make breadcrumb und filelist markup
$list = new OCP\Template( 'files', 'part.list', '' );
$list->assign( 'files', $files, false );
-$list->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'&dir=', false);
+$list->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'?dir=', false);
$list->assign( 'downloadURL', OCP\Util::linkTo('files', 'download.php').'?file=', false);
$breadcrumbNav = new OCP\Template( 'files', 'part.breadcrumb', '' );
$breadcrumbNav->assign( 'breadcrumb', $breadcrumb, false );
-$breadcrumbNav->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'&dir=', false);
+$breadcrumbNav->assign( 'baseURL', OCP\Util::linkTo('files', 'index.php').'?dir=', false);
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index e184cbfa915..0cf4a052225 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -185,7 +185,7 @@ FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.
});
FileActions.register('dir','Open', OC.PERMISSION_READ, '', function(filename){
- window.location=OC.linkTo('files', 'index.php') + '&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
+ window.location=OC.linkTo('files', 'index.php') + '?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
});
FileActions.setDefault('dir','Open');
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 6b49f622668..f08e412921e 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -46,7 +46,7 @@ var FileList={
html = $('<tr></tr>').attr({ "data-type": "dir", "data-size": size, "data-file": name, "data-permissions": $('#permissions').val()});
td = $('<td></td>').attr({"class": "filename", "style": 'background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')' });
td.append('<input type="checkbox" />');
- link_elem = $('<a></a>').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"&dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') });
+ link_elem = $('<a></a>').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') });
link_elem.append($('<span></span>').addClass('nametext').text(name));
link_elem.append($('<span></span>').attr({'class': 'uploadtext', 'currentUploads': 0}));
td.append(link_elem);