19declare(strict_types=1);
51 $query =
'SELECT * FROM chatroom_admconfig';
53 $row =
$DIC->database()->fetchAssoc($rset);
55 $client_settings = json_decode($row[
'client_settings'],
false, 512, JSON_THROW_ON_ERROR);
56 $server_settings = json_decode($row[
'server_settings'],
false, 512, JSON_THROW_ON_ERROR);
59 if ($server_settings instanceof stdClass) {
63 $settings->setSmiliesEnabled((
bool) ($client_settings->enable_smilies ??
false));
64 $settings->setClientUrlEnabled((
bool) ($server_settings->client_proxy ??
false));
65 $settings->setIliasUrlEnabled((
bool) ($server_settings->ilias_proxy ??
false));
66 $settings->setClientUrl((
string) ($server_settings->client_url ??
''));
67 $settings->setIliasUrl((
string) ($server_settings->ilias_url ??
''));
68 $settings->setSubDirectory((
string) ($server_settings->sub_directory ??
''));
71 if ($client_settings instanceof stdClass) {
72 $settings->setInstance((
string) ($client_settings->name ??
''));
73 $settings->setAuthKey((
string) ($client_settings->auth->key ??
''));
74 $settings->setAuthSecret((
string) ($client_settings->auth->secret ??
''));
103 if (strpos(
$url,
'://') ===
false) {
130 if (strpos(
$protocol,
'://') ===
false) {
190 if (strpos(
$url,
'://') ===
false) {
226 $this->smilies_enabled = $a_bool;
Class ilChatroomServerSettings.
setClientUrlEnabled(bool $clientUrlEnabled)
setProtocol(string $protocol)
setAuthSecret(string $authSecret)
setDomain(string $domain)
setInstance(string $instance)
setAuthKey(string $authKey)
setSubDirectory(string $subDirectory)
getBaseURL()
Creates base URL by calling $this->getProtocol(), $this->getDomain() and $this->getPort() and returne...
setSmiliesEnabled(bool $a_bool)
setClientUrl(string $clientUrl)
getURL(string $action, $scope=null)
Creates URL by calling $this->getBaseURL and using given $action and $scope and returns it.
setIliasUrl(string $iliasUrl)
setIliasUrlEnabled(bool $iliasUrlEnabled)