Commit 37f0caa6 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'F4812subrecordDetailExceptionForSystemVariables' into 'develop'

F4812subrecord detail exception for system variables

See merge request !366
parents 9d26e020 e3873dc9
Pipeline #6490 passed with stages
in 2 minutes and 59 seconds
......@@ -514,12 +514,9 @@ abstract class AbstractBuildForm {
* @throws \UserFormException
*/
public function getFormTag() {
$md5 = '';
$attribute = $this->getFormTagAttributes();
$honeypot = $this->getHoneypotVars();
$md5 = $this->buildInputRecordHashMd5();
return '<form ' . OnArray::toString($attribute, '=', ' ', "'") . '>' . $honeypot . $md5;
......@@ -2407,8 +2404,14 @@ abstract class AbstractBuildForm {
}
}
if ($this->showDebugInfoFlag)
// Check if detail contains Typo3 reserved keywords
if(isset($queryStringArray[CLIENT_PAGE_ID]) || isset($queryStringArray[CLIENT_PAGE_TYPE]) ||isset($queryStringArray[CLIENT_PAGE_LANGUAGE])){
throw new \UserFormException("Reserved Typo3 keyword (id, type, L) in formElement.parameter.detail - please use something else.");
}
if ($this->showDebugInfoFlag) {
$toolTip .= PHP_EOL . OnArray::toString($queryStringArray, ' = ', PHP_EOL, "'");
}
Support::appendTypo3ParameterToArray($queryStringArray);
// If there is a specific targetpage defined, take it.
......
......@@ -37,19 +37,19 @@ class Support {
self::$store = Store::getInstance();
if ($mode === PARAM_T3_ALL) {
$queryArray['id'] = self::$store->getVar(TYPO3_PAGE_ID, STORE_TYPO3);
$queryArray[CLIENT_PAGE_ID] = self::$store->getVar(TYPO3_PAGE_ID, STORE_TYPO3);
}
// TYPE
$tmp = self::$store->getVar(TYPO3_PAGE_TYPE, STORE_TYPO3);
if ($tmp !== false && $tmp != 0) {
$queryArray['type'] = $tmp;
$queryArray[CLIENT_PAGE_TYPE] = $tmp;
}
// Language
$tmp = self::$store->getVar(TYPO3_PAGE_LANGUAGE, STORE_TYPO3);
if ($tmp !== false && $tmp != 0) {
$queryArray['L'] = $tmp;
$queryArray[CLIENT_PAGE_LANGUAGE] = $tmp;
}
}
......@@ -84,11 +84,11 @@ class Support {
$type = self::$store->getVar(TYPO3_PAGE_TYPE, STORE_TYPO3);
$language = self::$store->getVar(TYPO3_PAGE_LANGUAGE, STORE_TYPO3);
if ($type != 0 && $type !== false && !isset($arr['type'])) {
if ($type != 0 && $type !== false && !isset($arr[CLIENT_PAGE_TYPE])) {
$uri .= '&type=' . $type;
}
if ($language != 0 && $language !== false && !isset($arr['L'])) {
if ($language != 0 && $language !== false && !isset($arr[CLIENT_PAGE_LANGUAGE])) {
$uri .= '&L=' . $language;
}
......@@ -455,7 +455,6 @@ class Support {
break;
default:
throw new \UserFormException('Date/time format not recognised.', ERROR_DATE_TIME_FORMAT_NOT_RECOGNISED);
break;
}
}
......@@ -537,7 +536,6 @@ class Support {
case '00.00.0000':
case '00:00:00':
return (self::dateTimeZero($dateFormat, $showZero, $showTime, $showSeconds));
break;
default:
break;
......
......@@ -26,6 +26,7 @@ class ReportAsFile
if (preg_match('/^\s*' . TOKEN_REPORT_FILE . '\s*=\s*([^\s]*)/m', $bodyText, $matches)) {
$providedPathFileName = $matches[1];
if(isset($providedPathFileName[0]) && $providedPathFileName[0] === '_') {
$pathFileNameSystem = Path::absoluteExt(Path::EXT_TO_REPORT_SYSTEM, substr($providedPathFileName, 1) . REPORT_FILE_EXTENSION);
if(HelperFile::isReadableException($pathFileNameSystem)) {
return $pathFileNameSystem;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment