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 $to = $this->httpRequest->getQueryParams()['rcp_to'] ?? '';
115 }
116
117 $cc = $this->httpRequest->getQueryParams()['rcp_cc'] ?? '';
118 $bcc = $this->httpRequest->getQueryParams()['rcp_bcc'] ?? '';
121
123 $this->ctrl->redirectByClass('ilmailformgui', 'mailUser');
124 } elseif (
'reply' ===
$type) {
126 $this->ctrl->redirectByClass('ilmailformgui', 'replyMail');
127 } elseif (
'read' ===
$type) {
129 $this->ctrl->redirectByClass('ilmailfoldergui', 'showMail');
130 } elseif (
'deliverFile' ===
$type) {
132
133 $fileName = '';
134 if (isset($this->httpRequest->getParsedBody()['filename'])) {
135 $fileName = $this->httpRequest->getParsedBody()['filename'];
136 } elseif (isset($this->httpRequest->getQueryParams()['filename'])) {
137 $fileName = $this->httpRequest->getQueryParams()['filename'];
138 }
140 $this->ctrl->redirectByClass('ilmailfoldergui', 'deliverFile');
141 } elseif (
'message_sent' ===
$type) {
142 ilUtil::sendSuccess($this->lng->txt('mail_message_send'), true);
143 $this->ctrl->redirectByClass('ilmailfoldergui');
144 } elseif (
'role' ===
$type) {
145 $roles = $this->httpRequest->getParsedBody()['roles'] ?? [];
146 if (is_array($roles) && count($roles) > 0) {
148 } elseif (isset($this->httpRequest->getQueryParams()['role'])) {
149 ilSession::set(
'mail_roles', [$this->httpRequest->getQueryParams()[
'role']]);
150 }
151
153 $this->ctrl->redirectByClass('ilmailformgui', 'mailRole');
154 }
155
156 if ('my_courses' === $this->httpRequest->getQueryParams()['view']) {
158 $this->ctrl->redirectByClass('ilmailformgui', 'searchCoursesTo');
159 }
160
161 if (isset($this->httpRequest->getQueryParams()['viewmode'])) {
162 $this->ctrl->setCmd('setViewMode');
163 }
164
165 $this->forwardClass = (string) $this->ctrl->getNextClass($this);
167
168 switch (strtolower($this->forwardClass)) {
169 case 'ilmailformgui':
171 break;
172
173 case 'ilcontactgui':
174 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
176 break;
177
178 case 'ilmailoptionsgui':
179 $this->tpl->setTitle($this->lng->txt('mail'));
181 break;
182
183 case 'ilmailfoldergui':
185 break;
186
187 default:
188 if (!($cmd = $this->ctrl->getCmd()) || !method_exists($this, $cmd)) {
189 $cmd = 'setViewMode';
190 }
191
192 $this->{$cmd}();
193 break;
194 }
195 }
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