4require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
    5require_once 
'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
 
    6require_once 
'Modules/Chatroom/classes/class.ilChatroomAdmin.php';
 
    7require_once 
'Modules/Chatroom/classes/class.ilChatroomConfigFileHandler.php';
 
   38        parent::__construct(
$gui);
 
   39        $this->commonSettings = 
new ilSetting(
'common');
 
   40        $this->ilTpl = 
$DIC->ui()->mainTemplate();
 
   61        if (!
$form->checkInput()) {
 
   62            $form->setValuesByPost();
 
   68            'protocol' => 
$form->getInput(
'protocol'),
 
   69            'port' => 
$form->getInput(
'port'),
 
   70            'address' => 
$form->getInput(
'address'),
 
   71            'cert' => 
$form->getInput(
'cert'),
 
   72            'key' => 
$form->getInput(
'key'),
 
   73            'dhparam' => 
$form->getInput(
'dhparam'),
 
   74            'log' => 
$form->getInput(
'log'),
 
   75            'error_log' => 
$form->getInput(
'error_log'),
 
   76            'log_level' => 
$form->getInput(
'log_level'),
 
   77            'ilias_proxy' => 
$form->getInput(
'ilias_proxy'),
 
   78            'ilias_url' => 
$form->getInput(
'ilias_url'),
 
   79            'client_proxy' => 
$form->getInput(
'client_proxy'),
 
   80            'client_url' => 
$form->getInput(
'client_url'),
 
   81            'sub_directory' => 
$form->getInput(
'sub_directory'),
 
   82            'deletion_mode' => 
$form->getInput(
'deletion_mode'),
 
   83            'deletion_unit' => 
$form->getInput(
'deletion_unit'),
 
   84            'deletion_value' => 
$form->getInput(
'deletion_value'),
 
   85            'deletion_time' => 
$form->getInput(
'deletion_time'),
 
   89        $adminSettings->saveGeneralSettings((
object) $settings);
 
   92        $fileHandler->createServerConfigFile($settings);
 
   94        ilUtil::sendSuccess($this->ilLng->txt(
'settings_has_been_saved'), 
true);
 
  107        $this->gui->switchToVisibleMode();
 
  110        $serverSettings = $adminSettings->loadGeneralSettings();
 
  112        if (
$form === 
null) {
 
  115            $form->setValuesByArray($serverSettings);
 
  120        $form->setTitle($this->ilLng->txt(
'chatserver_settings_title'));
 
  122            $form->addCommandButton(
'view-saveSettings', $this->ilLng->txt(
'save'));
 
  127        $this->ilTpl->setVariable(
'ADM_CONTENT', $settingsTpl->get());
 
  135        $chatSettings = 
new ilSetting(
'chatroom');
 
  136        if ($chatSettings->get(
'chat_enabled', 
false)) {
 
  169        require_once 
'Modules/Chatroom/classes/class.ilChatroomInstaller.php';
 
  170        ilChatroomInstaller::ensureCorrectPublicChatroomTreeLocation($ref_id);
 
  178        require_once 
'Modules/Chatroom/classes/class.ilChatroomInstaller.php';
 
  179        ilChatroomInstaller::createDefaultPublicRoom(
true);
 
  180        ilUtil::sendSuccess($this->ilLng->txt(
'public_chat_created'), 
true);
 
  189        require_once 
'Modules/Chatroom/classes/class.ilChatroomServerConnector.php';
 
  192            $serverSettings[
'port'] &&
 
  193            $serverSettings[
'address'] &&
 
  206        $furtherInformation = sprintf($this->ilLng->txt(
'server_further_information'), $this->getReadmePath());
 
  207        $serverTpl = 
new ilTemplate(
'tpl.chatroom_serversettings.html', 
true, 
true, 
'Modules/Chatroom');
 
  208        $serverTpl->setVariable(
'VAL_SERVERSETTINGS_FORM', 
$form->getHTML());
 
  209        $serverTpl->setVariable(
'LBL_SERVERSETTINGS_FURTHER_INFORMATION', $furtherInformation);
 
  233        if (!
$form->checkInput()) {
 
  234            $form->setValuesByPost();
 
  240            'name' => (
string) 
$form->getInput(
'client_name'),
 
  241            'enable_osd' => (
boolean) 
$form->getInput(
'enable_osd'),
 
  242            'enable_osc' => (
boolean) 
$form->getInput(
'enable_osc'),
 
  243            'osd_intervall' => (
int) 
$form->getInput(
'osd_intervall'),
 
  244            'chat_enabled' => ((
boolean) 
$form->getInput(
'chat_enabled')),
 
  245            'enable_smilies' => (
boolean) 
$form->getInput(
'enable_smilies'),
 
  246            'play_invitation_sound' => (
boolean) 
$form->getInput(
'play_invitation_sound'),
 
  247            'auth' => 
$form->getInput(
'auth')
 
  250        if (!$settings[
'chat_enabled']) {
 
  251            $settings[
'enable_osc'] = 
false;
 
  254        $notificationSettings = 
new ilSetting(
'notifications');
 
  255        $notificationSettings->set(
'osd_polling_intervall', (
int) 
$form->getInput(
'osd_intervall'));
 
  256        $notificationSettings->set(
'enable_osd', (
boolean) 
$form->getInput(
'enable_osd'));
 
  258        $chatSettings = 
new ilSetting(
'chatroom');
 
  259        $chatSettings->set(
'chat_enabled', $settings[
'chat_enabled']);
 
  260        $chatSettings->set(
'enable_osc', $settings[
'enable_osc']);
 
  261        $chatSettings->set(
'play_invitation_sound', (
boolean) 
$form->getInput(
'play_invitation_sound'));
 
  264        $adminSettings->saveClientSettings((
object) $settings);
 
  267        $fileHandler->createClientConfigFile($settings);
 
  269        ilUtil::sendSuccess($this->ilLng->txt(
'settings_has_been_saved'), 
true);
 
  281        $this->gui->switchToVisibleMode();
 
  284        $serverSettings = $adminSettings->loadGeneralSettings();
 
  286        if (
$form === 
null) {
 
  287            $clientSettings = $adminSettings->loadClientSettings();
 
  290            $form->setValuesByArray($clientSettings);
 
  295        $form->setTitle($this->ilLng->txt(
'general_settings_title'));
 
  297            $form->addCommandButton(
'view-saveClientSettings', $this->ilLng->txt(
'save'));
 
  302        $this->ilTpl->setVariable(
'ADM_CONTENT', $settingsTpl->get());
 
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomAdminViewGUI.
saveSettings()
Saves settings fetched from $_POST.
__construct(ilChatroomObjectGUI $gui)
Constructor.
const CHATROOM_README_PATH
serversettings(ilPropertyFormGUI $form=null)
Prepares view form and displays it.
createPublicRoom()
Creates a public chatroom.
checkServerConnection(array $serverSettings)
Checks for server connection.
saveClientSettings()
Saves client settings fetched from $_POST.
clientsettings(ilPropertyFormGUI $form=null)
getReadmePath()
Get the path to the README.txt file.
createSettingTemplate(ilPropertyFormGUI $form)
executeDefault($method)
{mixed}
Class ilChatroomGUIHandler.
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
static checkServerConnection($use_cache=true)
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
This class provides processing control methods.
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _lookupObjId($a_id)
static _hasUntrashedReference($a_obj_id)
checks wether an object has at least one reference that is not in trash
special template class to simplify handling of ITX/PEAR
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form