server/apps/files_sharing/ajax/toggleresharing.php

9 lines
250 B
PHP

<?php
OCP\JSON::checkAppEnabled('files_sharing');
OCP\JSON::checkAdminUser();
if ($_POST['resharing'] == true) {
OCP\Config::setAppValue('files_sharing', 'resharing', 'yes');
} else {
OCP\Config::setAppValue('files_sharing', 'resharing', 'no');
}