62 $this->prefix = preg_replace(
'/[^a-zA-Z0-9_\\-]/',
'', $prefix);
82 $allowedMethods = array(
89 $this->sessionData =
$GLOBALS[
'TSFE']->fe_user->getKey(
'user', $this->prefix);
91 $this->sessionData =
$GLOBALS[
'TSFE']->fe_user->getKey(
'ses', $this->prefix);
93 if (!empty($this->sessionData)) {
96 if (!in_array($method, $allowedMethods)) {
119 public function get($key) {
121 case $this->method ===
'get' && isset($_GET[$this->prefix][$key]):
123 case $this->method ===
'post' && isset($_POST[$this->prefix][$key]):
125 case $this->method ===
'session' && isset($this->sessionData[$key]):
126 return $this->sessionData[$key];
138 public function has($key) {
140 case $this->method ===
'get' && isset($_GET[$this->prefix][$key]):
142 case $this->method ===
'post' && isset($_POST[$this->prefix][$key]):
144 case $this->method ===
'session' && isset($this->sessionData[$key]):
158 case $this->method ===
'get' && isset($_GET[$this->prefix]):
160 case $this->method ===
'post' && isset($_POST[$this->prefix]):
162 case $this->method ===
'session' && !empty($this->sessionData):
178 public function getQuery($key = NULL, $default = NULL) {
182 return isset($_GET[$this->prefix][$key]) ? $_GET[
$this->prefix][$key] : $default;
194 public function getPost($key = NULL, $default = NULL) {
198 return isset($_POST[$this->prefix][$key]) ? $_POST[
$this->prefix][$key] : $default;
214 return isset($this->sessionData[$key]) ? $this->sessionData[$key] : $default;
228 if ($this->method ===
'get') {
229 return $this->
getQuery($key, $default);
230 } elseif ($this->method ===
'post') {
231 return $this->
getPost($key, $default);
232 } elseif ($this->method ===
'session') {
250 $GLOBALS[
'TSFE']->storeSessionData();
261 $GLOBALS[
'TSFE']->fe_user->setKey(
'user', $this->prefix, NULL);
263 $GLOBALS[
'TSFE']->fe_user->setKey(
'ses', $this->prefix, NULL);
265 $GLOBALS[
'TSFE']->storeSessionData();
276 if (isset($_FILES[$this->prefix]) && is_array($_FILES[$this->prefix])) {
277 foreach ($_FILES[$this->prefix][
'tmp_name'] as $fieldName => $uploadedFile) {
279 $_FILES[$this->prefix][
'error'][$fieldName] !== UPLOAD_ERR_OK
280 || !is_uploaded_file($_FILES[$this->prefix][
'tmp_name'][$fieldName])
282 unset($formData[$fieldName]);
285 # Remove items with blacklisted keys 286 $formData[$fieldName] = array_diff_key(
287 $formData[$fieldName],
288 array(
'tempFilename' => 1,
'originalFilename' => 1,
'type' => 1,
'size' => 1)
291 if (is_uploaded_file($uploadedFile)) {
293 if (TYPO3_OS ===
'WIN') {
296 if ($tempFilename !==
'') {
298 $finfo = finfo_open(FILEINFO_MIME_TYPE);
299 $mimeType = finfo_file($finfo, $tempFilename);
301 $formData[$fieldName] = array(
302 'tempFilename' => $tempFilename,
303 'originalFilename' => $_FILES[$this->prefix][
'name'][$fieldName],
305 'size' => (
int)$_FILES[$this->prefix][
'size'][$fieldName]
319 $this->sessionData = $formData;
331 if (is_array($values)) {
332 foreach ($values as $value) {
333 if (is_array($value) && isset($value[
'tempFilename'])) {
static unlink_tempfile($uploadedTempFileName)
static upload_to_tempfile($uploadedFileName)
static fixWindowsFilePath($theFile)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]