87 {
88 $type = $this->httpRequest->getQueryParams()[
'type'] ??
'';
89 $mailId = (int) ($this->httpRequest->getQueryParams()['mail_id'] ?? 0);
90
91 $this->ctrl->setParameterByClass('ilmailformgui', 'mobj_id', $this->currentFolderId);
92 $this->ctrl->setParameterByClass('ilmailfoldergui', 'mobj_id', $this->currentFolderId);
93
94 if (
'search_res' ===
$type) {
96 $this->ctrl->redirectByClass('ilmailformgui', 'searchResults');
97 } elseif (
'attach' ===
$type) {
99 $this->ctrl->redirectByClass('ilmailformgui', 'mailAttachment');
100 } elseif (
'new' ===
$type) {
101 $to = $this->httpRequest->getQueryParams()['rcp_to'] ?? '';
106 }
107
108 $cc = $this->httpRequest->getQueryParams()['rcp_cc'] ?? '';
109 $bcc = $this->httpRequest->getQueryParams()['rcp_bcc'] ?? '';
112
114 $this->ctrl->redirectByClass('ilmailformgui', 'mailUser');
115 } elseif (
'reply' ===
$type) {
117 $this->ctrl->redirectByClass('ilmailformgui', 'replyMail');
118 } elseif (
'read' ===
$type) {
120 $this->ctrl->redirectByClass('ilmailfoldergui', 'showMail');
121 } elseif (
'deliverFile' ===
$type) {
123
124 $fileName = '';
125 if (isset($this->httpRequest->getParsedBody()['filename'])) {
126 $fileName = $this->httpRequest->getParsedBody()['filename'];
127 } elseif (isset($this->httpRequest->getQueryParams()['filename'])) {
128 $fileName = $this->httpRequest->getQueryParams()['filename'];
129 }
131 ;
132 $this->ctrl->redirectByClass('ilmailfoldergui', 'deliverFile');
133 } elseif (
'message_sent' ===
$type) {
134 \ilUtil::sendSuccess($this->lng->txt('mail_message_send'), true);
135 $this->ctrl->redirectByClass('ilmailfoldergui');
136 } elseif (
'role' ===
$type) {
137 $roles = $this->httpRequest->getParsedBody()['roles'] ?? [];
138 if (is_array($roles) && count($roles) > 0) {
140 } elseif (isset($this->httpRequest->getQueryParams()['role'])) {
141 \ilSession::set(
'mail_roles', [$this->httpRequest->getQueryParams()[
'role']]);
142 }
143
145 $this->ctrl->redirectByClass('ilmailformgui', 'mailRole');
146 }
147
148 if ('my_courses' === $this->httpRequest->getQueryParams()['view']) {
150 $this->ctrl->redirectByClass('ilmailformgui', 'searchCoursesTo');
151 }
152
153 if (isset($this->httpRequest->getQueryParams()['viewmode'])) {
154 \ilSession::set(self::VIEWMODE_SESSION_KEY, $this->httpRequest->getQueryParams()[
'viewmode']);
155 $this->ctrl->setCmd('setViewMode');
156 }
157
158 $this->forwardClass = $this->ctrl->getNextClass($this);
160
161 if (
'tree' ===
ilSession::get(self::VIEWMODE_SESSION_KEY) && $this->ctrl->getCmd() !==
'showExplorer') {
163 }
164
165 switch ($this->forwardClass) {
166 case 'ilmailformgui':
168 break;
169
170 case 'ilcontactgui':
171 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
173 break;
174
175 case 'ilmailoptionsgui':
176 $this->tpl->setTitle($this->lng->txt('mail'));
178 break;
179
180 case 'ilmailfoldergui':
182 break;
183
184 default:
185 if (!($cmd = $this->ctrl->getCmd()) || !method_exists($this, $cmd)) {
186 $cmd = 'setViewMode';
187 }
188
189 $this->{$cmd}();
190 break;
191 }
192 }
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