From 5fadd530888459a62c7113a916247033fb14c96c Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 23 Jan 2013 09:18:26 +0100 Subject: missing renames of publicListView to disableSharing --- apps/files_sharing/js/share.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing/js') diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index a46d0179801..780b9c1bf6d 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,6 +1,6 @@ $(document).ready(function() { - if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !publicListView) { + if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { if ($('#dir').val() == '/') { -- cgit v1.2.3 From 2e42c6f54f85c5ac5b339625d04685535ac69d40 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Sat, 26 Jan 2013 14:07:35 +0100 Subject: Use HTML5 data attribute + fix undefined variable --- apps/files/appinfo/routes.php | 5 +---- apps/files/index.php | 1 + apps/files/js/publiclistview.php | 20 -------------------- apps/files/templates/part.list.php | 2 +- apps/files_sharing/js/share.js | 2 ++ apps/files_sharing/templates/public.php | 2 -- 6 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 apps/files/js/publiclistview.php (limited to 'apps/files_sharing/js') 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/index.php b/apps/files/index.php index 2c6b689b0c9..378f5e02e62 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 @@ - - * 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/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 @@ - + "> - -- cgit v1.2.3