vtenext/modules/Users/SaveDefModuleView.php
2021-04-28 20:10:26 +02:00

24 lines
678 B
PHP

<?php
/*************************************
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
* SPDX-License-Identifier: AGPL-3.0-only
************************************/
global $current_user;
/* crmv@184240 crmv@203484 */
if (!is_admin($current_user)) {
// redirect to settings, where an error will be shown
header("Location: index.php?module=Settings&action=index&parenttab=Settings");
die();
}
$VTEP = VTEProperties::getInstance();
$singlepane_view = $VTEP->getProperty('layout.singlepane_view');
if ($singlepane_view) {
$VTEP->setProperty('layout.singlepane_view', false);
} else {
$VTEP->setProperty('layout.singlepane_view', true);
}