Project

General

Profile

Actions

Feature #27508

closed

Get value from cookie

Added by Simon Schaufelberger over 13 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
Category:
TypoScript
Target version:
-
Start date:
2011-06-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

At the moment the only possibilty to get a value from a cookie is this:

lib.files = TEXT
lib.files {
    data = global:HTTP_COOKIE_VARS|files
}

where files is the cookie name.
The problem with this? It does NOT work if "register_long_arrays" in php.ini is off and by the way:
This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.
from: http://php.net/manual/en/ini.core.php

I would like to create a patch for the core which does the following:

add a new item to "function getData" in class.tslib_content.php for example:

case 'cookie' :
    $retVal = $this->getCookie($key);
    break;

and then a function which basically does this (of course with more error checking)
function getCookie($key) {
    return $_COOKIE[$key];
}

any comments on that or shall i commit to gerrit already?

Actions

Also available in: Atom PDF