97 : void
98 {
99 $type = '';
100 if ($this->
http->wrapper()->query()->has(
'type')) {
101 $type = $this->
http->wrapper()->query()->retrieve(
'type', $this->
refinery->kindlyTo()->string());
102 }
103 $mail_id = 0;
104 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
105 $mail_id = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
106 }
107
108 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mobj_id', $this->current_folder_id);
109 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mobj_id', $this->current_folder_id);
110
113 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchResults');
116 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailAttachment');
118 foreach (['to', 'cc', 'bcc'] as $reciepient_type) {
119 $key = 'rcp_' . $reciepient_type;
120
121 $recipients = '';
122 if ($this->
http->wrapper()->query()->has($key)) {
123 $recipients = $this->
http->wrapper()->query()->retrieve(
124 $key,
125 $this->
refinery->kindlyTo()->string()
126 );
127 }
128
130
135 }
136 }
138 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailUser');
140 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mail_id', $mail_id);
141 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'replyMail');
142 } elseif ($type === 'read') {
143 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
144 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'showMail');
145 } elseif ($type === 'deliverFile') {
147 if ($this->
http->wrapper()->post()->has(
'filename')) {
149 'filename',
150 $this->
refinery->kindlyTo()->string()
151 );
152 } elseif ($this->
http->wrapper()->query()->has(
'filename')) {
154 'filename',
155 $this->
refinery->kindlyTo()->string()
156 );
157 }
158
160 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
161 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'deliverFile');
162 } elseif ($type === 'message_sent') {
163 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'mail_message_send'),
true);
164 $this->
ctrl->redirectByClass(ilMailFolderGUI::class);
166 $roles = [];
167 if ($this->
http->wrapper()->post()->has(
'roles')) {
168 $roles = $this->
http->wrapper()->post()->retrieve(
169 'roles',
170 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
171 );
172 } elseif ($this->
http->wrapper()->query()->has(
'role')) {
173 $roles = [$this->
http->wrapper()->query()->retrieve(
'role', $this->
refinery->kindlyTo()->string())];
174 }
175
176 if ($roles !== []) {
178 }
179
181 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailRole');
182 }
183
184 $view = '';
185 if ($this->
http->wrapper()->query()->has(
'view')) {
186 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
187 }
188 if ($view === 'my_courses') {
189 $search_crs = '';
190 if ($this->
http->wrapper()->query()->has(
'search_crs')) {
192 $this->
http->wrapper()->query()->retrieve(
'search_crs', $this->refinery->kindlyTo()->string())
193 );
194 }
195 $this->
ctrl->setParameter($this,
'search_crs', $search_crs);
196 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchCoursesTo');
197 }
198
199 $this->forward_class = (string) $this->
ctrl->getNextClass($this);
201
202 switch (strtolower($this->forward_class)) {
203 case strtolower(ilMailFormGUI::class):
205 break;
206
207 case strtolower(ilContactGUI::class):
208 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
210 break;
211
212 case strtolower(ilMailAttachmentGUI::class):
213 $this->tpl->setTitle($this->
lng->txt(
'mail'));
215 $gui->manage();
216 $this->
ctrl->forwardCommand($gui);
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 }
@ilCtrl_Calls ilMailFolderGUI:
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="")