SPDX-License-Identifier: MIT SPDX-License-Identifier: ISC SPDX-License-Identifier: GPL-3.0-or-later SPDX-License-Identifier: AGPL-3.0-or-later SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0) SPDX-FileCopyrightText: inherits developers SPDX-FileCopyrightText: escape-html developers SPDX-FileCopyrightText: Tobias Koppers @sokra SPDX-FileCopyrightText: Roman Shtylman SPDX-FileCopyrightText: Roeland Jago Douma SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors SPDX-FileCopyrightText: Joyent SPDX-FileCopyrightText: Jonas Schade SPDX-FileCopyrightText: GitHub Inc. SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 (https://cure53.de/) SPDX-FileCopyrightText: Christoph Wurst SPDX-FileCopyrightText: Christoph Wurst SPDX-FileCopyrightText: Alkemics This file is generated from multiple sources. Included packages: - @nextcloud/auth - version: 2.4.0 - license: GPL-3.0-or-later - @nextcloud/browser-storage - version: 0.4.0 - license: GPL-3.0-or-later - @nextcloud/capabilities - version: 1.2.0 - license: GPL-3.0-or-later - semver - version: 7.6.3 - license: ISC - @nextcloud/event-bus - version: 3.3.1 - license: GPL-3.0-or-later - @nextcloud/files - version: 3.10.1 - license: AGPL-3.0-or-later - @nextcloud/initial-state - version: 2.2.0 - license: GPL-3.0-or-later - @nextcloud/l10n - version: 3.1.0 - license: GPL-3.0-or-later - @nextcloud/logger - version: 3.0.2 - license: GPL-3.0-or-later - @nextcloud/paths - version: 2.2.1 - license: GPL-3.0-or-later - @nextcloud/router - version: 3.0.1 - license: GPL-3.0-or-later - @nextcloud/sharing - version: 0.2.4 - license: GPL-3.0-or-later - cancelable-promise - version: 4.3.1 - license: MIT - dompurify - version: 3.1.7 - license: (MPL-2.0 OR Apache-2.0) - escape-html - version: 1.0.3 - license: MIT - inherits - version: 2.0.3 - license: ISC - util - version: 0.10.4 - license: MIT - path - version: 0.12.7 - license: MIT - process - version: 0.11.10 - license: MIT - typescript-event-target - version: 1.1.1 - license: MIT - webpack - version: 5.94.0 - license: MIT - nextcloud - version: 1.0.0 - license: AGPL-3.0-or-later ='Jerome-Herbinet-patch-1'>Jerome-Herbinet-patch-1 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
blob: 259713ae68ec9156065bebc6f5ea3d4c040c121d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 * @author Robin Appelman <robin@icewind.nl>
 * @author Vincent Petry <vincent@nextcloud.com>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program. If not, see <http://www.gnu.org/licenses/>
 *
 */
use OCP\Share\IManager;

$config = \OC::$server->getConfig();
$userSession = \OC::$server->getUserSession();
// TODO: move this to the generated config.js
/** @var IManager $shareManager */
$shareManager = \OC::$server->get(IManager::class);
$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no';;

$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false);
$isIE = OC_Util::isIe();

// renders the controls and table headers template
$tmpl = new OCP\Template('files', 'list', '');

// gridview not available for ie
$tmpl->assign('showgridview', $showgridview && !$isIE);
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
$tmpl->printPage();