diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index dfac43d1b12f66b5e78670de8b154746b0fe1157..1970a80e1b76837957fc90bb2f3abb290c43ce9f 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -1,8 +1,8 @@
 <script type="text/javascript">
-<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?>
-		var publicListView = true;
+<?php if ( array_key_exists('disableSharing', $_) && $_['disableSharing'] == true ) :?>
+		var disableSharing = true;
 <?php else: ?>
-		var publicListView = false;
+		var disableSharing = false;
 <?php endif; ?>
 </script>
 
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 8a546d62163d8ffa520d92eda8f8a6b86108844e..59faf82e26e075e3a17272f3359540fb3fb47a6f 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() == '/') {
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 487b9e79961b6fb1a734012cac2433d3ee0432fe..7e1959cd959c6acb96a68044e08ea81cc2056521 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -257,7 +257,7 @@ if ($linkItem) {
 
 			$list = new OCP\Template('files', 'part.list', '');
 			$list->assign('files', $files, false);
-			$list->assign('publicListView', true);
+			$list->assign('disableSharing', true);
 			$list->assign('baseURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&path=', false);
 			$list->assign('downloadURL', OCP\Util::linkToPublic('files').$urlLinkIdentifiers.'&download&path=', false);
 			$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' );
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 647e1e08a31e4e511f21daa15d915bd34b793b51..bfcc521e106f1e533b424d145b13f8e3e35cb9e8 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -1,8 +1,8 @@
 <script type="text/javascript">
-	<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) {
-		echo "var publicListView = true;";
+	<?php if ( array_key_exists('disableSharing', $_) && $_['disableSharing'] == true ) {
+		echo "var disableSharing = true;";
 	} else {
-		echo "var publicListView = false;";
+		echo "var disableSharing = false;";
 	}
 	?>
 </script>