46 public static function getLinkTarget($gui, $cmd, array $gui_params = array(), array $mail_params = array(), $context_params = array())
48 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
60 public static function getRedirectTarget($gui, $cmd, array $gui_params = array(), array $mail_params = array(), array $context_params = array())
62 return self::getTargetUrl(
'&', $gui, $cmd, $gui_params, $mail_params, $context_params);
74 protected static function getTargetUrl($argument_separator, $gui, $cmd, array $gui_params = array(), array $mail_params = array(), array $context_params = array())
81 foreach ($mail_params as
$key => $value) {
82 $mparams .= $argument_separator .
$key .
'=' . urlencode($value);
85 foreach ($context_params as
$key => $value) {
86 if (
$key == self::CONTEXT_KEY) {
87 $mparams .= $argument_separator .
$key .
'=' . urlencode($value);
89 $mparams .= $argument_separator . self::CONTEXT_PREFIX .
'_' .
$key .
'=' . urlencode($value);
93 if (is_object($gui)) {
94 $ilCtrlTmp = clone $DIC->ctrl();
95 foreach ($gui_params as
$key => $value) {
96 $ilCtrlTmp->setParameter($gui,
$key, $value);
98 $referer = $ilCtrlTmp->getLinkTarget($gui, $cmd,
'',
false,
false);
99 } elseif (is_string($gui)) {
103 $referer = $argument_separator . self::REFERER_KEY .
'=' . rawurlencode(base64_encode($referer));
105 return 'ilias.php?baseClass=ilMailGUI' . $referer . $mparams;
115 if (isset($request_params[self::REFERER_KEY])) {
116 $session[self::REFERER_KEY] = base64_decode(rawurldecode($request_params[self::REFERER_KEY]));
117 $session[self::SIGNATURE_KEY] = base64_decode(rawurldecode($request_params[self::SIGNATURE_KEY]));
119 $ctx_params = array();
120 foreach ($request_params as
$key => $value) {
121 $prefix = substr(
$key, 0, strlen(self::CONTEXT_PREFIX));
122 if ($prefix == self::CONTEXT_PREFIX) {
123 if (
$key == self::CONTEXT_KEY) {
124 $ctx_params[
$key] = $value;
126 $ctx_params[substr(
$key, strlen(self::CONTEXT_PREFIX .
'_'))] = $value;
130 $session[self::CONTEXT_PREFIX] = $ctx_params;
133 unset(
$session[self::SIGNATURE_KEY]);
134 unset(
$session[self::CONTEXT_PREFIX]);
148 $sig =
$session[self::SIGNATURE_KEY];
150 unset(
$session[self::SIGNATURE_KEY]);
166 $parts = parse_url(
$url);
167 if (isset($parts[
'query']) && strlen($parts[
'query'])) {
168 $url .=
'&returned_from_mail=1';
170 $url .=
'?returned_from_mail=1';
187 return isset(
$session[self::REFERER_KEY]) && strlen(
$session[self::REFERER_KEY]) ? true :
false;
197 isset(
$session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) &&
198 strlen(
$session[self::CONTEXT_PREFIX][self::CONTEXT_KEY]) ?
199 $session[self::CONTEXT_PREFIX][self::CONTEXT_KEY] : null
219 if (isset(
$session[self::CONTEXT_PREFIX])) {
220 return (array)
$session[self::CONTEXT_PREFIX];
232 $session[self::CONTEXT_PREFIX] = $parameters;
if(!array_key_exists('StateId', $_REQUEST)) $id
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.