48 array $gui_params = [],
49 array $mail_params = [],
52 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
66 array $gui_params = [],
67 array $mail_params = [],
68 array $context_params = []
70 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
83 string $argument_separator,
86 array $gui_params = [],
87 array $mail_params = [],
88 array $context_params = []
95 foreach ($mail_params as $key => $value) {
96 $mparams .= $argument_separator . $key .
'=' . urlencode($value);
99 foreach ($context_params as $key => $value) {
100 if ($key == self::CONTEXT_KEY) {
101 $mparams .= $argument_separator . $key .
'=' . urlencode($value);
103 $mparams .= $argument_separator . self::CONTEXT_PREFIX .
'_' . $key .
'=' . urlencode($value);
107 if (is_object($gui)) {
108 $ilCtrlTmp = clone $DIC->ctrl();
109 foreach ($gui_params as $key => $value) {
110 $ilCtrlTmp->setParameter($gui, $key, $value);
112 $referer = $ilCtrlTmp->getLinkTarget($gui, $cmd,
'',
false,
false);
113 } elseif (is_string($gui)) {
117 $referer = $argument_separator . self::REFERER_KEY .
'=' . rawurlencode(base64_encode($referer));
119 return 'ilias.php?baseClass=ilMailGUI' . $referer . $mparams;
129 if (isset($queryParameters[self::REFERER_KEY])) {
130 $session[self::REFERER_KEY] = base64_decode(rawurldecode($queryParameters[self::REFERER_KEY]));
131 $session[self::SIGNATURE_KEY] = base64_decode(rawurldecode($queryParameters[self::SIGNATURE_KEY] ??
''));
133 $contextParameters = [];
134 foreach ($queryParameters as $key => $value) {
135 $prefix = substr($key, 0, strlen(self::CONTEXT_PREFIX));
136 if ($prefix == self::CONTEXT_PREFIX) {
137 if ($key == self::CONTEXT_KEY) {
138 $contextParameters[$key] = $value;
140 $contextParameters[substr($key, strlen(self::CONTEXT_PREFIX .
'_'))] = $value;
144 $session[self::CONTEXT_PREFIX] = $contextParameters;
146 if (isset(
$session[self::REFERER_KEY])) {
149 if (isset(
$session[self::SIGNATURE_KEY])) {
150 unset(
$session[self::SIGNATURE_KEY]);
152 if (isset(
$session[self::CONTEXT_PREFIX])) {
153 unset(
$session[self::CONTEXT_PREFIX]);
168 if (isset(
$session[self::SIGNATURE_KEY])) {
169 $sig =
$session[self::SIGNATURE_KEY];
171 unset(
$session[self::SIGNATURE_KEY]);
186 if (isset(
$session[self::REFERER_KEY])) {
188 if (is_string(
$url) &&
$url !==
'') {
189 $parts = parse_url(
$url);
190 if (isset($parts[
'query']) && $parts[
'query'] !==
'') {
191 $url .=
'&returned_from_mail=1';
193 $url .=
'?returned_from_mail=1';
197 if (isset($parts[
'host']) && $ilias_url_parts[
'host'] !== $parts[
'host']) {
198 $url =
'ilias.php?baseClass=ilMailGUI';
217 isset(
$session[self::REFERER_KEY]) &&
218 is_string(
$session[self::REFERER_KEY]) &&
230 isset(
$session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) &&
231 is_string(
$session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) ?
232 $session[self::CONTEXT_PREFIX][self::CONTEXT_KEY] : null
252 if (isset(
$session[self::CONTEXT_PREFIX]) && is_array(
$session[self::CONTEXT_PREFIX])) {
253 return $session[self::CONTEXT_PREFIX];
266 $session[self::CONTEXT_PREFIX] = $parameters;
276 $session[
'rcp_' .
$type] = array_map(
'strval', array_values($recipients));
286 $key =
'rcp_' .
$type;
288 return array_map(
'strval', array_values(
$session[$key]));
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.