diff options
author | sualko <klaus@jsxc.org> | 2017-01-23 18:42:29 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2017-01-23 18:42:29 +0300 |
commit | 19e8f7512048df2b80069292feae56075f065eec (patch) | |
tree | 5d8aba9cb666d305bc4d80d48d952c9e85b9f5e4 /build/ajax/getSettings.php | |
parent | 859c5b3adbf27ea3e2f4d25e5409bb2929f2c5d4 (diff) |
build v3.1.0-betav3.1.0-beta
Diffstat (limited to 'build/ajax/getSettings.php')
-rw-r--r-- | build/ajax/getSettings.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build/ajax/getSettings.php b/build/ajax/getSettings.php index e638a20..4a03d39 100644 --- a/build/ajax/getSettings.php +++ b/build/ajax/getSettings.php @@ -39,12 +39,27 @@ if ($data ['serverType'] === 'internal') { exit; } +$data ['screenMediaExtension']['firefox'] = trim($config->getAppValue('ojsxc', 'firefoxExtension')); +$data ['screenMediaExtension']['chrome'] = trim($config->getAppValue('ojsxc', 'chromeExtension')); + $data ['xmpp'] ['url'] = trim($config->getAppValue('ojsxc', 'boshUrl')); $data ['xmpp'] ['domain'] = trim($config->getAppValue('ojsxc', 'xmppDomain')); $data ['xmpp'] ['resource'] = trim($config->getAppValue('ojsxc', 'xmppResource')); $data ['xmpp'] ['overwrite'] = validateBoolean($config->getAppValue('ojsxc', 'xmppOverwrite')); $data ['xmpp'] ['onlogin'] = true; +if (validateBoolean($config->getAppValue('ojsxc', 'xmppPreferMail'))) { + $mail = $config->getUserValue($username,'settings','email'); + + if ($mail !== null) { + list($u, $d) = explode("@", $mail, 2); + if ($d !== null && $d !== "") { + $data ['xmpp'] ['username'] = $u; + $data ['xmpp'] ['domain'] = $d; + } + } +} + $options = $config->getUserValue($username, 'ojsxc', 'options'); if ($options !== null) { |