diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-28 00:29:46 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-28 00:29:46 -0800 |
commit | 31d83fddc482959d7fb4f7377cc7020c59c30951 (patch) | |
tree | 2294989764a9f87e8965a8ea8e71aadc5d09bfb4 /apps/files | |
parent | 44d6ff61e254635f055a1c92f12c653e5b1a1e7b (diff) | |
parent | 2e42c6f54f85c5ac5b339625d04685535ac69d40 (diff) | |
download | nextcloud-server-31d83fddc482959d7fb4f7377cc7020c59c30951.tar.gz nextcloud-server-31d83fddc482959d7fb4f7377cc7020c59c30951.zip |
Merge pull request #1321 from owncloud/csp-fixes
Files: CSP fixes
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/admin.php | 4 | ||||
-rw-r--r-- | apps/files/appinfo/routes.php | 5 | ||||
-rw-r--r-- | apps/files/download.php | 3 | ||||
-rw-r--r-- | apps/files/index.php | 1 | ||||
-rw-r--r-- | apps/files/js/publiclistview.php | 20 | ||||
-rw-r--r-- | apps/files/settings.php | 4 | ||||
-rw-r--r-- | apps/files/templates/part.list.php | 2 |
7 files changed, 3 insertions, 36 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 e2149cd4135..1b70b1e38f8 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 9ee5cae6c85..e3197b9e3c0 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -76,6 +76,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); 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 52ec9fd0fe3..ea730a5a727 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 78f91467c7a..f3f06d61d66 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']); |