ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjMailGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Object/classes/class.ilObjectGUI.php';
5
12{
15
16 const PASSWORD_PLACE_HOLDER = '***********************';
17
21 protected $tabs;
22
26 protected $rbacsystem;
27
31 protected $settings;
32
39 public function __construct($a_data, $a_id, $a_call_by_reference)
40 {
41 global $DIC;
42
43 $this->type = 'mail';
44 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
45
46 $this->tabs = $DIC->tabs();
47 $this->rbacsystem = $DIC->rbac()->system();
48 $this->settings = $DIC['ilSetting'];
49
50 $this->lng->loadLanguageModule('mail');
51 }
52
56 public function executeCommand()
57 {
58 $next_class = $this->ctrl->getNextClass($this);
59 $cmd = $this->ctrl->getCmd();
60 $this->prepareOutput();
61
62 switch ($next_class) {
63 case 'ilpermissiongui':
64 require_once 'Services/AccessControl/classes/class.ilPermissionGUI.php';
65 $perm_gui = new ilPermissionGUI($this);
66 $this->ctrl->forwardCommand($perm_gui);
67 break;
68
69 case 'ilmailtemplategui':
70 if (!$this->isViewAllowed()) {
71 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
72 }
73
74 require_once 'Services/Mail/classes/class.ilMailTemplateGUI.php';
75 $this->ctrl->forwardCommand(new ilMailTemplateGUI($this->object));
76 break;
77
78 default:
79 if (!$cmd) {
80 $cmd = 'view';
81 }
82 $cmd .= 'Object';
83 $this->$cmd();
84 break;
85 }
86
87 return true;
88 }
89
93 private function isEditingAllowed()
94 {
95 return $this->rbacsystem->checkAccess('write', $this->object->getRefId());
96 }
97
101 private function isViewAllowed()
102 {
103 return $this->rbacsystem->checkAccess('read', $this->object->getRefId());
104 }
105
109 private function isPermissionChangeAllowed()
110 {
111 return $this->rbacsystem->checkAccess('edit_permission', $this->object->getRefId());
112 }
113
117 public function getAdminTabs()
118 {
119 $this->getTabs();
120 }
121
125 protected function getTabs()
126 {
127 if ($this->isViewAllowed()) {
128 $this->tabs->addTarget(
129 'settings',
130 $this->ctrl->getLinkTarget($this, 'view'),
131 array(
132 'view',
133 'save',
134 '',
135 'showExternalSettingsForm',
136 'saveExternalSettingsForm',
137 'sendTestUserMail',
138 'sendTestSystemMail'
139 ),
140 '',
141 ''
142 );
143 }
144
145 if ($this->isViewAllowed()) {
146 $this->tabs->addTarget(
147 'mail_templates',
148 $this->ctrl->getLinkTargetByClass('ilmailtemplategui', 'showTemplates'),
149 '',
150 'ilmailtemplategui'
151 );
152 }
153
154 if ($this->isPermissionChangeAllowed()) {
155 $this->tabs->addTarget(
156 'perm_settings',
157 $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), 'perm'),
158 array('perm', 'info', 'owner'),
159 'ilpermissiongui'
160 );
161 }
162 }
163
167 protected function buildSettingsSubTabs($activeSubTab)
168 {
169 if ($this->isViewAllowed()) {
170 $this->tabs->addSubTab(
171 self::SETTINGS_SUB_TAB_ID_GENERAL,
172 $this->lng->txt('mail_settings_general_tab'),
173 $this->ctrl->getLinkTarget($this, 'view')
174 );
175
176 if ($this->settings->get('mail_allow_external')) {
177 $this->tabs->addSubTab(
178 self::SETTINGS_SUB_TAB_ID_EXTERNAL,
179 $this->lng->txt('mail_settings_external_tab'),
180 $this->ctrl->getLinkTarget($this, 'showExternalSettingsForm')
181 );
182 }
183
184 $this->tabs->activateSubTab($activeSubTab);
185 }
186 }
187
191 public function viewObject()
192 {
194 }
195
200 {
201 if (!$this->isViewAllowed()) {
202 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
203 }
204
205 $this->buildSettingsSubTabs(self::SETTINGS_SUB_TAB_ID_GENERAL);
206
207 if ($form === null) {
208 $form = $this->getGeneralSettingsForm();
210 }
211
212 $this->tpl->setContent($form->getHTML());
213 }
214
218 protected function getGeneralSettingsForm()
219 {
220 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
221 $form = new ilPropertyFormGUI();
222
223 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
224 $form->setTitle($this->lng->txt('general_settings'));
225
226 $cb = new ilCheckboxInputGUI($this->lng->txt('mail_allow_external'), 'mail_allow_external');
227 $cb->setInfo($this->lng->txt('mail_allow_external_info'));
228 $cb->setValue(1);
229 $cb->setDisabled(!$this->isEditingAllowed());
230 $form->addItem($cb);
231
232 include_once 'Services/Mail/classes/Form/class.ilIncomingMailInputGUI.php';
233 $incoming_mail_gui = new ilIncomingMailInputGUI($this->lng->txt('mail_incoming'), 'incoming_type');
234 $incoming_mail_gui->setDisabled(!$this->isEditingAllowed());
235 $this->ctrl->setParameterByClass('ilobjuserfoldergui', 'ref_id', USER_FOLDER_ID);
236 $incoming_mail_gui->setInfo(sprintf(
237 $this->lng->txt('mail_settings_incoming_type_see_also'),
238 $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'settings')
239 ));
240 $this->ctrl->clearParametersByClass('ilobjuserfoldergui');
241 $form->addItem($incoming_mail_gui);
242
243 $ti = new ilNumberInputGUI($this->lng->txt('mail_maxsize_attach'), 'mail_maxsize_attach');
244 $ti->setSuffix($this->lng->txt('kb'));
245 $ti->setInfo($this->lng->txt('mail_max_size_attachments_total'));
246 $ti->setMaxLength(10);
247 $ti->setSize(10);
248 $ti->setDisabled(!$this->isEditingAllowed());
249 $form->addItem($ti);
250
251 $mn = new ilFormSectionHeaderGUI();
252 $mn->setTitle($this->lng->txt('mail_member_notification'));
253 $form->addItem($mn);
254
255 $cron_mail = new ilSelectInputGUI($this->lng->txt('cron_mail_notification'), 'mail_notification');
256 $cron_options = array(
257 0 => $this->lng->txt('cron_mail_notification_never'),
258 1 => $this->lng->txt('cron_mail_notification_cron')
259 );
260 $cron_mail->setOptions($cron_options);
261 $cron_mail->setInfo(sprintf(
262 $this->lng->txt('cron_mail_notification_desc'),
263 $this->lng->txt('mail_allow_external')
264 ));
265 $cron_mail->setDisabled(!$this->isEditingAllowed());
266 $form->addItem($cron_mail);
267
268 require_once 'Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php';
271 $form,
272 $this
273 );
274
275 if ($this->isEditingAllowed()) {
276 $form->addCommandButton('save', $this->lng->txt('save'));
277 }
278
279 return $form;
280 }
281
286 {
287 $form->setValuesByArray(array(
288 'mail_allow_external' => $this->settings->get('mail_allow_external'),
289 'incoming_type' => (int) $this->settings->get('mail_incoming_mail'),
290 'mail_address_option' => strlen($this->settings->get('mail_address_option')) ? $this->settings->get('mail_address_option') : ilMailOptions::FIRST_EMAIL,
291 'mail_address_option_both' => strlen($this->settings->get('mail_address_option')) ? $this->settings->get('mail_address_option') : ilMailOptions::FIRST_EMAIL,
292 'mail_maxsize_attach' => $this->settings->get('mail_maxsize_attach'),
293 'mail_notification' => $this->settings->get('mail_notification')
294 ));
295 }
296
300 public function saveObject()
301 {
302 if (!$this->isEditingAllowed()) {
303 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
304 }
305
306 $form = $this->getGeneralSettingsForm();
307 if ($form->checkInput()) {
308 $incoming_type = (int) $form->getInput('incoming_type');
309
310 $mail_address_option = ilMailOptions::FIRST_EMAIL;
311 if ($incoming_type == ilMailOptions::INCOMING_EMAIL) {
312 $mail_address_option = (int) $form->getInput('mail_address_option');
313 } else {
314 if ($incoming_type == ilMailOptions::INCOMING_BOTH) {
315 $mail_address_option = (int) $form->getInput('mail_address_option_both');
316 }
317 }
318
319 $this->settings->set('mail_allow_external', (int) $form->getInput('mail_allow_external'));
320 $this->settings->set('mail_incoming_mail', $incoming_type);
321 $this->settings->set('mail_address_option', $mail_address_option);
322 $this->settings->set('mail_maxsize_attach', $form->getInput('mail_maxsize_attach'));
323 $this->settings->set('mail_notification', (int) $form->getInput('mail_notification'));
324
325 ilUtil::sendSuccess($this->lng->txt('saved_successfully'), true);
326 $this->ctrl->redirect($this);
327 }
328
329 $form->setValuesByPost();
331 }
332
337 {
338 if (!$this->isViewAllowed()) {
339 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
340 }
341
342 $this->buildSettingsSubTabs(self::SETTINGS_SUB_TAB_ID_EXTERNAL);
343
344 if ($form === null) {
347 }
348
349 if (strlen($GLOBALS['DIC']->user()->getEmail()) > 0) {
350 require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
351
353 $btn->setUrl($this->ctrl->getLinkTarget($this, 'sendTestUserMail'));
354 $btn->setCaption('mail_external_send_test_usr');
355 $GLOBALS['DIC']->toolbar()->addButtonInstance($btn);
356
358 $btn->setUrl($this->ctrl->getLinkTarget($this, 'sendTestSystemMail'));
359 $btn->setCaption('mail_external_send_test_sys');
360 $GLOBALS['DIC']->toolbar()->addButtonInstance($btn);
361 }
362
363 $this->tpl->setContent($form->getHTML());
364 }
365
366 protected function sendTestUserMailObject()
367 {
368 $this->sendTestMail(true);
369 }
370
371 protected function sendTestSystemMailObject()
372 {
373 $this->sendTestMail();
374 }
375
379 protected function sendTestMail($is_manual_mail = false)
380 {
381 if (!$this->isViewAllowed()) {
382 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
383 }
384
385 if (strlen($GLOBALS['DIC']->user()->getEmail()) == 0) {
386 return $this->showExternalSettingsFormObject();
387 }
388
389 require_once 'Services/Mail/classes/class.ilMail.php';
390 if ($is_manual_mail) {
391 $mail = new ilMail($GLOBALS['DIC']->user()->getId());
392 $type = array('normal');
393 } else {
394 $mail = new ilMail(ANONYMOUS_USER_ID);
395 $type = array('system');
396 }
397
398 $mail->setSaveInSentbox(false);
399 $mail->appendInstallationSignature(true);
400 $mail->sendMail($GLOBALS['DIC']->user()->getEmail(), '', '', 'Test Subject', 'Test Body', array(), $type);
401
402 ilUtil::sendSuccess($this->lng->txt('mail_external_test_sent'));
404 }
405
409 protected function getExternalSettingsForm()
410 {
411 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
412 $form = new ilPropertyFormGUI();
413
414 $form->setFormAction($this->ctrl->getFormAction($this, 'saveExternalSettingsForm'));
415 $form->setTitle($this->lng->txt('mail_settings_external_frm_head'));
416
417 $smtp = new ilCheckboxInputGUI($this->lng->txt('mail_smtp_status'), 'mail_smtp_status');
418 $smtp->setInfo($this->lng->txt('mail_smtp_status_info'));
419 $smtp->setValue(1);
420 $smtp->setDisabled(!$this->isEditingAllowed());
421 $form->addItem($smtp);
422
423 $host = new ilTextInputGUI($this->lng->txt('mail_smtp_host'), 'mail_smtp_host');
424 $host->setInfo($this->lng->txt('mail_smtp_host_info'));
425 $host->setRequired(true);
426 $host->setDisabled(!$this->isEditingAllowed());
427 $smtp->addSubItem($host);
428
429 $port = new ilNumberInputGUI($this->lng->txt('mail_smtp_port'), 'mail_smtp_port');
430 $port->setInfo($this->lng->txt('mail_smtp_port_info'));
431 $port->allowDecimals(false);
432 $port->setMinValue(0);
433 $port->setMinValue(0);
434 $port->setRequired(true);
435 $port->setDisabled(!$this->isEditingAllowed());
436 $smtp->addSubItem($port);
437
438 $encryption = new ilSelectInputGUI($this->lng->txt('mail_smtp_encryption'), 'mail_smtp_encryption');
439 $encryptionOptions = array(
440 '' => $this->lng->txt('please_choose'),
441 'tls' => $this->lng->txt('mail_smtp_encryption_tls'),
442 'ssl' => $this->lng->txt('mail_smtp_encryption_ssl')
443 );
444
445 $encryption->setOptions($encryptionOptions);
446 $encryption->setDisabled(!$this->isEditingAllowed());
447 $smtp->addSubItem($encryption);
448
449 $user = new ilTextInputGUI($this->lng->txt('mail_smtp_user'), 'mail_smtp_user');
450 $user->setDisabled(!$this->isEditingAllowed());
451 $smtp->addSubItem($user);
452
453 $password = new ilPasswordInputGUI($this->lng->txt('mail_smtp_password'), 'mail_smtp_password');
454 $password->setRetype(false);
455 $password->setSkipSyntaxCheck(true);
456 $password->setDisabled(!$this->isEditingAllowed());
457 $smtp->addSubItem($password);
458
459 $pre = new ilTextInputGUI($this->lng->txt('mail_subject_prefix'), 'mail_subject_prefix');
460 $pre->setSize(12);
461 $pre->setMaxLength(32);
462 $pre->setInfo($this->lng->txt('mail_subject_prefix_info'));
463 $pre->setDisabled(!$this->isEditingAllowed());
464 $form->addItem($pre);
465
466 $send_html = new ilCheckboxInputGUI($this->lng->txt('mail_send_html'), 'mail_send_html');
467 $send_html->setInfo($this->lng->txt('mail_send_html_info'));
468 $send_html->setValue(1);
469 $send_html->setDisabled(!$this->isEditingAllowed());
470 $form->addItem($send_html);
471
472 $sh = new ilFormSectionHeaderGUI();
473 $sh->setTitle($this->lng->txt('mail_settings_user_frm_head'));
474 $form->addItem($sh);
475
476 $user_from_address = new ilEMailInputGUI(
477 $this->lng->txt('mail_system_usr_from_addr'),
478 'mail_system_usr_from_addr'
479 );
480 $user_from_address->setInfo($this->lng->txt('mail_system_usr_from_addr_info'));
481 $user_from_address->setRequired(true);
482 $user_from_address->setDisabled(!$this->isEditingAllowed());
483 $form->addItem($user_from_address);
484
485 $user_from_name = new ilTextInputGUI($this->lng->txt('mail_system_usr_from_name'), 'mail_system_usr_from_name');
486 $user_from_name->setInfo($this->lng->txt('mail_system_usr_from_name_info'));
487 $user_from_name->setRequired(true);
488 $user_from_name->setDisabled(!$this->isEditingAllowed());
489 $form->addItem($user_from_name);
490
491 $user_envelope_from_addr = new ilEMailInputGUI(
492 $this->lng->txt('mail_system_usr_env_from_addr'),
493 'mail_system_usr_env_from_addr'
494 );
495 $user_envelope_from_addr->setInfo($this->lng->txt('mail_system_usr_env_from_addr_info'));
496 $user_envelope_from_addr->setDisabled(!$this->isEditingAllowed());
497 $form->addItem($user_envelope_from_addr);
498
499 $sh = new ilFormSectionHeaderGUI();
500 $sh->setTitle($this->lng->txt('mail_settings_system_frm_head'));
501 $form->addItem($sh);
502
503 $system_from_addr = new ilEMailInputGUI(
504 $this->lng->txt('mail_system_sys_from_addr'),
505 'mail_system_sys_from_addr'
506 );
507 $system_from_addr->setInfo($this->lng->txt('mail_system_sys_from_addr_info'));
508 $system_from_addr->setRequired(true);
509 $system_from_addr->setDisabled(!$this->isEditingAllowed());
510 $form->addItem($system_from_addr);
511
512 $system_from_name = new ilTextInputGUI(
513 $this->lng->txt('mail_system_sys_from_name'),
514 'mail_system_sys_from_name'
515 );
516 $system_from_name->setRequired(true);
517 $system_from_name->setDisabled(!$this->isEditingAllowed());
518 $form->addItem($system_from_name);
519
520 $system_reply_to_addr = new ilEMailInputGUI(
521 $this->lng->txt('mail_system_sys_reply_to_addr'),
522 'mail_system_sys_reply_to_addr'
523 );
524 $system_reply_to_addr->setRequired(true);
525 $system_reply_to_addr->setDisabled(!$this->isEditingAllowed());
526 $form->addItem($system_reply_to_addr);
527
528 $system_return_path = new ilEMailInputGUI(
529 $this->lng->txt('mail_system_sys_env_from_addr'),
530 'mail_system_sys_env_from_addr'
531 );
532 $system_return_path->setInfo($this->lng->txt('mail_system_sys_env_from_addr_info'));
533 $system_return_path->setDisabled(!$this->isEditingAllowed());
534 $form->addItem($system_return_path);
535
536 $signature = new ilTextAreaInputGUI($this->lng->txt('mail_system_sys_signature'), 'mail_system_sys_signature');
537 $signature->setRows(8);
538 $signature->setDisabled(!$this->isEditingAllowed());
539 $form->addItem($signature);
540
541 require_once 'Services/Mail/classes/Form/class.ilManualPlaceholderInputGUI.php';
542 $placeholders = new ilManualPlaceholderInputGUI('mail_system_sys_signature');
543 foreach (array(
544 array('placeholder' => 'CLIENT_NAME', 'label' => $this->lng->txt('mail_nacc_client_name')),
545 array('placeholder' => 'CLIENT_DESC', 'label' => $this->lng->txt('mail_nacc_client_desc')),
546 array('placeholder' => 'CLIENT_URL', 'label' => $this->lng->txt('mail_nacc_ilias_url'))
547 ) as $key => $value) {
548 $placeholders->addPlaceholder($value['placeholder'], $value['label']);
549 }
550 $placeholders->setDisabled(!$this->isEditingAllowed());
551 $form->addItem($placeholders);
552
553 if ($this->isEditingAllowed()) {
554 $form->addCommandButton('saveExternalSettingsForm', $this->lng->txt('save'));
555 }
556
557 return $form;
558 }
559
564 {
565 $subjectPrefix = $this->settings->get('mail_subject_prefix');
566 if (false === $subjectPrefix) {
567 $subjectPrefix = ilMail::MAIL_SUBJECT_PREFIX;
568 }
569
570 $form->setValuesByArray(array(
571 'mail_smtp_status' => (bool) $this->settings->get('mail_smtp_status'),
572 'mail_smtp_host' => $this->settings->get('mail_smtp_host'),
573 'mail_smtp_port' => (int) $this->settings->get('mail_smtp_port'),
574 'mail_smtp_user' => $this->settings->get('mail_smtp_user'),
575 'mail_smtp_password' => strlen($this->settings->get('mail_smtp_password')) > 0 ? self::PASSWORD_PLACE_HOLDER : '',
576 'mail_smtp_encryption' => $this->settings->get('mail_smtp_encryption'),
577 'mail_subject_prefix' => $subjectPrefix,
578 'mail_send_html' => (int) $this->settings->get('mail_send_html'),
579 'mail_system_usr_from_addr' => $this->settings->get('mail_system_usr_from_addr'),
580 'mail_system_usr_from_name' => $this->settings->get('mail_system_usr_from_name'),
581 'mail_system_usr_env_from_addr' => $this->settings->get('mail_system_usr_env_from_addr'),
582 'mail_system_sys_from_addr' => $this->settings->get('mail_system_sys_from_addr'),
583 'mail_system_sys_from_name' => $this->settings->get('mail_system_sys_from_name'),
584 'mail_system_sys_reply_to_addr' => $this->settings->get('mail_system_sys_reply_to_addr'),
585 'mail_system_sys_env_from_addr' => $this->settings->get('mail_system_sys_env_from_addr'),
586 'mail_system_sys_signature' => $this->settings->get('mail_system_sys_signature')
587 ));
588 }
589
594 {
595 if (!$this->isEditingAllowed()) {
596 $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->WARNING);
597 }
598
600 $isFormValid = $form->checkInput();
601
602 if (!$isFormValid) {
603 $form->setValuesByPost();
605 return;
606 }
607
608 $isSmtpEnabled = (bool) $form->getInput('mail_smtp_status');
609 if ($isSmtpEnabled && $form->getInput('mail_smtp_user') && !$form->getInput('mail_smtp_password')) {
610 $form->getItemByPostVar('mail_smtp_password')->setRequired(true);
611 $form->getItemByPostVar('mail_smtp_password')->setAlert($this->lng->txt('mail_smtp_password_req'));
612 $form->setValuesByPost();
614 return;
615 }
616
617 $this->settings->set('mail_smtp_status', (int) $form->getInput('mail_smtp_status'));
618 $this->settings->set('mail_smtp_host', $form->getInput('mail_smtp_host'));
619 $this->settings->set('mail_smtp_port', (int) $form->getInput('mail_smtp_port'));
620 $this->settings->set('mail_smtp_user', $form->getInput('mail_smtp_user'));
621 if ($form->getInput('mail_smtp_password') != self::PASSWORD_PLACE_HOLDER) {
622 $this->settings->set('mail_smtp_password', $form->getInput('mail_smtp_password'));
623 }
624 $this->settings->set('mail_smtp_encryption', $form->getInput('mail_smtp_encryption'));
625
626 $this->settings->set('mail_send_html', $form->getInput('mail_send_html'));
627 $this->settings->set('mail_subject_prefix', $form->getInput('mail_subject_prefix'));
628 $this->settings->set('mail_system_usr_from_addr', $form->getInput('mail_system_usr_from_addr'));
629 $this->settings->set('mail_system_usr_from_name', $form->getInput('mail_system_usr_from_name'));
630 $this->settings->set('mail_system_usr_env_from_addr', $form->getInput('mail_system_usr_env_from_addr'));
631 $this->settings->set('mail_system_sys_from_addr', $form->getInput('mail_system_sys_from_addr'));
632 $this->settings->set('mail_system_sys_from_name', $form->getInput('mail_system_sys_from_name'));
633 $this->settings->set('mail_system_sys_reply_to_addr', $form->getInput('mail_system_sys_reply_to_addr'));
634 $this->settings->set('mail_system_sys_env_from_addr', $form->getInput('mail_system_sys_env_from_addr'));
635 $this->settings->set('mail_system_sys_signature', $form->getInput('mail_system_sys_signature'));
636
637 ilUtil::sendSuccess($this->lng->txt('saved_successfully'), true);
638 $this->ctrl->redirect($this, 'showExternalSettingsForm');
639 }
640
644 public static function _goto($a_target)
645 {
646 global $DIC;
647
648 require_once 'Services/Mail/classes/class.ilMail.php';
649 $mail = new ilMail($DIC->user()->getId());
650
651 if ($DIC->rbac()->system()->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
652 ilUtil::redirect('ilias.php?baseClass=ilMailGUI');
653 } else {
654 if ($DIC->access()->checkAccess('read', '', ROOT_FOLDER_ID)) {
655 $_GET['cmd'] = 'frameset';
656 $_GET['target'] = '';
657 $_GET['ref_id'] = ROOT_FOLDER_ID;
658 $_GET['baseClass'] = 'ilRepositoryGUI';
660 sprintf(
661 $DIC->language()->txt('msg_no_perm_read_item'),
663 ),
664 true
665 );
666
667 include 'ilias.php';
668 exit();
669 }
670 }
671
672 $DIC['ilErr']->raiseError($DIC->language()->txt('msg_no_perm_read'), $DIC['ilErr']->FATAL);
673 }
674}
sprintf('%.4f', $callTime)
user()
Definition: user.php:4
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
const USER_FOLDER_ID
Class ilObjUserFolder.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
This class represents a checkbox property in a property form.
This class represents a email property in a property form.
This class represents a section header in a property form.
Class ilIncomingMailInputGUI.
static getInstance()
Factory.
Class ilMailTemplateGUI.
This class handles base functions for mail handling.
const MAIL_SUBJECT_PREFIX
Class ilManualPlaceholderInputGUI.
This class represents a number property in a property form.
viewObject()
list childs of current object@access public
__construct($a_data, $a_id, $a_call_by_reference)
ilObjMailGUI constructor.
saveObject()
save object@access public
const SETTINGS_SUB_TAB_ID_GENERAL
populateGeneralSettingsForm(ilPropertyFormGUI $form)
const SETTINGS_SUB_TAB_ID_EXTERNAL
getAdminTabs()
administration tabs show only permissions and trash folder
static _goto($a_target)
sendTestMail($is_manual_mail=false)
showExternalSettingsFormObject(ilPropertyFormGUI $form=null)
getTabs()
get tabs abstract method.@abstract overwrite in derived GUI class of your object type @access public
buildSettingsSubTabs($activeSubTab)
showGeneralSettingsForm(ilPropertyFormGUI $form=null)
executeCommand()
execute command
populateExternalSettingsForm(ilPropertyFormGUI $form)
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput($a_show_subobjects=true)
prepare output
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
This class represents a password property in a property form.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$key
Definition: croninfo.php:18
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)
$type
$password
Definition: pwgen.php:17
if(isset($_POST['submit'])) $form
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2