100 : void
101 {
103 if ($this->
http->wrapper()->query()->has(
'type')) {
104 $type = $this->
http->wrapper()->query()->retrieve(
'type', $this->
refinery->kindlyTo()->string());
105 }
106 $mailId = 0;
107 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
108 $mailId = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
109 }
110
111 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mobj_id', $this->currentFolderId);
112 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mobj_id', $this->currentFolderId);
113
116 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchResults');
119 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailAttachment');
121 foreach (['to', 'cc', 'bcc'] as $reciepient_type) {
122 $key =
'rcp_' . $reciepient_type;
123
124 $recipients = '';
125 if ($this->
http->wrapper()->query()->has(
$key)) {
126 $recipients = $this->
http->wrapper()->query()->retrieve(
128 $this->
refinery->kindlyTo()->string()
129 );
130 }
131
133
138 }
139 }
141 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailUser');
143 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mail_id', $mailId);
144 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'replyMail');
145 } elseif (
'read' ===
$type) {
146 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mailId);
147 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'showMail');
148 } elseif (
'deliverFile' ===
$type) {
149 $fileName = "";
150 if ($this->
http->wrapper()->post()->has(
'filename')) {
151 $fileName = $this->
http->wrapper()->post()->retrieve(
152 'filename',
153 $this->
refinery->kindlyTo()->string()
154 );
155 } elseif ($this->
http->wrapper()->query()->has(
'filename')) {
156 $fileName = $this->
http->wrapper()->query()->retrieve(
157 'filename',
158 $this->
refinery->kindlyTo()->string()
159 );
160 }
161
163 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mailId);
164 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'deliverFile');
165 } elseif (
'message_sent' ===
$type) {
166 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'mail_message_send'),
true);
167 $this->
ctrl->redirectByClass(ilMailFolderGUI::class);
169 $roles = [];
170 if ($this->
http->wrapper()->post()->has(
'roles')) {
171 $roles = $this->
http->wrapper()->post()->retrieve(
172 'roles',
173 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
174 );
175 } elseif ($this->
http->wrapper()->query()->has(
'role')) {
176 $roles = [$this->
http->wrapper()->query()->retrieve(
'role', $this->
refinery->kindlyTo()->string())];
177 }
178
179 if ($roles !== []) {
181 }
182
184 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailRole');
185 }
186
187 $view = "";
188 if ($this->
http->wrapper()->query()->has(
'view')) {
189 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
190 }
191 if ('my_courses' === $view) {
192 $search_crs = "";
193 if ($this->
http->wrapper()->query()->has(
'search_crs')) {
195 $this->
http->wrapper()->query()->retrieve(
'search_crs', $this->refinery->kindlyTo()->string())
196 );
197 }
198 $this->
ctrl->setParameter($this,
'search_crs', $search_crs);
199 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchCoursesTo');
200 }
201
202 if ($this->
http->wrapper()->query()->has(
'viewmode')) {
203 $this->
ctrl->setCmd(
'setViewMode');
204 }
205
206 $this->forwardClass = (string) $this->
ctrl->getNextClass($this);
208
209 switch (strtolower($this->forwardClass)) {
210 case strtolower(ilMailFormGUI::class):
212 break;
213
214 case strtolower(ilContactGUI::class):
215 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
217 break;
218
219 case strtolower(ilMailOptionsGUI::class):
220 $this->tpl->setTitle($this->
lng->txt(
'mail'));
222 break;
223
224 case strtolower(ilMailFolderGUI::class):
226 break;
227
228 default:
229 if (!($cmd = $this->
ctrl->getCmd()) || !method_exists($this, $cmd)) {
230 $cmd = 'setViewMode';
231 }
232
233 $this->{$cmd}();
234 break;
235 }
236 }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")