Welcome to mirror list, hosted at ThFree Co, Russian Federation.

setAdminSettings.php « ajax « build - github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a098f1592badafa5536240343855bcfe8c2b430 (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
<?php

OCP\User::checkAdminUser();
OCP\JSON::callCheck();

$config = \OC::$server->getConfig();

$config->setAppValue('ojsxc', 'serverType', $_POST ['serverType']);
$config->setAppValue('ojsxc', 'boshUrl', trim($_POST ['boshUrl']));
$config->setAppValue('ojsxc', 'xmppDomain', trim($_POST ['xmppDomain']));
$config->setAppValue('ojsxc', 'xmppResource', trim($_POST ['xmppResource']));
$config->setAppValue('ojsxc', 'xmppOverwrite', (isset($_POST ['xmppOverwrite'])) ? $_POST ['xmppOverwrite'] : 'false');
$config->setAppValue('ojsxc', 'xmppStartMinimized', (isset($_POST ['xmppStartMinimized'])) ? $_POST ['xmppStartMinimized'] : 'false');
$config->setAppValue('ojsxc', 'xmppPreferMail', (isset($_POST ['xmppPreferMail'])) ? $_POST ['xmppPreferMail'] : 'false');

$config->setAppValue('ojsxc', 'iceUrl', trim($_POST ['iceUrl']));
$config->setAppValue('ojsxc', 'iceUsername', trim($_POST ['iceUsername']));
$config->setAppValue('ojsxc', 'iceCredential', $_POST ['iceCredential']);
$config->setAppValue('ojsxc', 'iceSecret', $_POST ['iceSecret']);
$config->setAppValue('ojsxc', 'iceTtl', $_POST ['iceTtl']);

$config->setAppValue('ojsxc', 'firefoxExtension', $_POST ['firefoxExtension']);
$config->setAppValue('ojsxc', 'chromeExtension', $_POST ['chromeExtension']);

echo 'true';