Skip to content
Snippets Groups Projects
Commit 9bacb0e1 authored by Björn Schießle's avatar Björn Schießle
Browse files

rename "publicListView" option to "disableSharing", this is more meaningful...

rename "publicListView" option to "disableSharing", this is more meaningful also because it is not only useful for the public list view
parent f15deaf5
No related branches found
No related tags found
No related merge requests found
<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>
......
$(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() == '/') {
var item = $('#dir').val() + filename;
......
......@@ -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', '' );
......
<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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment