summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-01-28 19:37:58 +0100
committerRobin Appelman <icewind@owncloud.com>2013-01-28 19:37:58 +0100
commit74f6f856289b62c69a1e12e9fc38cf6fd7b29680 (patch)
tree255d0437dd79840b9291e0d8874bd5b031fc89a3 /apps
parent232cc3211b2b312d4e32e7d0fb482a2b7affe89a (diff)
parent06c1c35ac90f7920afa637ab0b628529b4135d40 (diff)
downloadnextcloud-server-74f6f856289b62c69a1e12e9fc38cf6fd7b29680.tar.gz
nextcloud-server-74f6f856289b62c69a1e12e9fc38cf6fd7b29680.zip
merge master into filesystem
Diffstat (limited to 'apps')
-rw-r--r--apps/files/admin.php4
-rw-r--r--apps/files/appinfo/routes.php5
-rw-r--r--apps/files/download.php3
-rw-r--r--apps/files/index.php4
-rw-r--r--apps/files/js/publiclistview.php20
-rw-r--r--apps/files/settings.php4
-rw-r--r--apps/files/templates/part.list.php2
-rw-r--r--apps/files_sharing/js/share.js2
-rw-r--r--apps/files_sharing/templates/public.php2
9 files changed, 8 insertions, 38 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php
index f747f8645f6..02c3147dba5 100644
--- a/apps/files/admin.php
+++ b/apps/files/admin.php
@@ -21,10 +21,6 @@
*
*/
-
-// Init owncloud
-
-
OCP\User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index 307a4d0320d..043782a9c04 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -8,7 +8,4 @@
$this->create('download', 'download{file}')
->requirements(array('file' => '.*'))
- ->actionInclude('files/download.php');
-// oC JS config
-$this->create('publicListView', 'js/publiclistview.js')
- ->actionInclude('files/js/publiclistview.php'); \ No newline at end of file
+ ->actionInclude('files/download.php'); \ No newline at end of file
diff --git a/apps/files/download.php b/apps/files/download.php
index ddd23df4125..e3fe24e45d7 100644
--- a/apps/files/download.php
+++ b/apps/files/download.php
@@ -21,9 +21,6 @@
*
*/
-// Init owncloud
-
-
// Check if we are a user
OCP\User::checkLoggedIn();
diff --git a/apps/files/index.php b/apps/files/index.php
index 13eebfc6990..894758d38f6 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -93,6 +93,7 @@ $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('downloadURL', OCP\Util::linkTo('files', 'download.php') . '?file=', false);
+$list->assign('disableSharing', false);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false);
@@ -100,6 +101,9 @@ $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$permissions = OCP\PERMISSION_READ;
+if (\OC\Files\Filesystem::isCreatable($dir . '/')) {
+ $permissions |= OCP\PERMISSION_CREATE;
+}
if (\OC\Files\Filesystem::isUpdatable($dir . '/')) {
$permissions |= OCP\PERMISSION_UPDATE;
}
diff --git a/apps/files/js/publiclistview.php b/apps/files/js/publiclistview.php
deleted file mode 100644
index f1c67aabb48..00000000000
--- a/apps/files/js/publiclistview.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * Copyright (c) 2013 Lukas Reschke <lukas@statuscode.ch>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-// Set the content type to Javascript
-header("Content-type: text/javascript");
-
-// Disallow caching
-header("Cache-Control: no-cache, must-revalidate");
-header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
-
-if ( array_key_exists('disableSharing', $_) && $_['disableSharing'] == true ) {
- echo "var disableSharing = true;";
-} else {
- echo "var disableSharing = false;";
-}
diff --git a/apps/files/settings.php b/apps/files/settings.php
index 30463210f71..8687f013137 100644
--- a/apps/files/settings.php
+++ b/apps/files/settings.php
@@ -21,10 +21,6 @@
*
*/
-
-// Init owncloud
-
-
// Check if we are a user
OCP\User::checkLoggedIn();
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index 1c683c11230..5c39dda85ff 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -1,4 +1,4 @@
-<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('publicListView');?>"></script>
+<input type="hidden" id="disableSharing" data-status="<?php echo $_['disableSharing']; ?>">
<?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']);
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 780b9c1bf6d..eb5a6e8cb7f 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -1,5 +1,7 @@
$(document).ready(function() {
+ var disableSharing = $('#disableSharing').data('status');
+
if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) {
FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) {
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 275360ac2a8..35cca7c42dc 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -1,5 +1,3 @@
-<script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('publicListView');?>"></script>
-
<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
<input type="hidden" name="downloadURL" value="<?php echo $_['downloadURL'] ?>" id="downloadURL">
<input type="hidden" name="filename" value="<?php echo $_['filename'] ?>" id="filename">