95 : void
96 {
97 $type = $this->httpRequest->getQueryParams()[
'type'] ??
'';
98 $mailId = (int) ($this->httpRequest->getQueryParams()['mail_id'] ?? 0);
99
100 $this->ctrl->setParameterByClass('ilmailformgui', 'mobj_id', $this->currentFolderId);
101 $this->ctrl->setParameterByClass('ilmailfoldergui', 'mobj_id', $this->currentFolderId);
102
103 if (
'search_res' ===
$type) {
105 $this->ctrl->redirectByClass('ilmailformgui', 'searchResults');
106 } elseif (
'attach' ===
$type) {
108 $this->ctrl->redirectByClass('ilmailformgui', 'mailAttachment');
109 } elseif (
'new' ===
$type) {
110 foreach (['to', 'cc', 'bcc'] as $reciepient_type) {
111 $key = 'rcp_' . $reciepient_type;
112
113 $recipients = $this->httpRequest->getQueryParams()[$key] ?? '';
114
116
121 }
122 }
123
125 $this->ctrl->redirectByClass('ilmailformgui', 'mailUser');
126 } elseif (
'reply' ===
$type) {
128 $this->ctrl->redirectByClass('ilmailformgui', 'replyMail');
129 } elseif (
'read' ===
$type) {
131 $this->ctrl->redirectByClass('ilmailfoldergui', 'showMail');
132 } elseif (
'deliverFile' ===
$type) {
134
135 $fileName = '';
136 if (isset($this->httpRequest->getParsedBody()['filename'])) {
137 $fileName = $this->httpRequest->getParsedBody()['filename'];
138 } elseif (isset($this->httpRequest->getQueryParams()['filename'])) {
139 $fileName = $this->httpRequest->getQueryParams()['filename'];
140 }
142 $this->ctrl->redirectByClass('ilmailfoldergui', 'deliverFile');
143 } elseif (
'message_sent' ===
$type) {
144 ilUtil::sendSuccess($this->lng->txt('mail_message_send'), true);
145 $this->ctrl->redirectByClass('ilmailfoldergui');
146 } elseif (
'role' ===
$type) {
147 $roles = $this->httpRequest->getParsedBody()['roles'] ?? [];
148 if (is_array($roles) && count($roles) > 0) {
150 } elseif (isset($this->httpRequest->getQueryParams()['role'])) {
151 ilSession::set(
'mail_roles', [$this->httpRequest->getQueryParams()[
'role']]);
152 }
153
155 $this->ctrl->redirectByClass('ilmailformgui', 'mailRole');
156 }
157
158 $view = (string) ($this->httpRequest->getQueryParams()['view'] ?? '');
159 if ('my_courses' === $view) {
161 $this->ctrl->redirectByClass('ilmailformgui', 'searchCoursesTo');
162 }
163
164 if (isset($this->httpRequest->getQueryParams()['viewmode'])) {
165 $this->ctrl->setCmd('setViewMode');
166 }
167
168 $this->forwardClass = (string) $this->ctrl->getNextClass($this);
170
171 switch (strtolower($this->forwardClass)) {
172 case 'ilmailformgui':
174 break;
175
176 case 'ilcontactgui':
177 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
179 break;
180
181 case 'ilmailoptionsgui':
182 $this->tpl->setTitle($this->lng->txt('mail'));
184 break;
185
186 case 'ilmailfoldergui':
188 break;
189
190 default:
191 if (!($cmd = $this->ctrl->getCmd()) || !method_exists($this, $cmd)) {
192 $cmd = 'setViewMode';
193 }
194
195 $this->{$cmd}();
196 break;
197 }
198 }
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled