Commit ebae6839 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #11998 - remove urlParam from getBodyText ... not necessary here

parent dfdd9a07
Pipeline #5058 passed with stages
in 3 minutes and 37 seconds
...@@ -1112,28 +1112,18 @@ class Database { ...@@ -1112,28 +1112,18 @@ class Database {
} }
/** /**
* Load tt-content record with subheader=$uid or uid=$uid (depending if $uid is numeric).
* It's important that the current DB class has access to the Typo3 DB.
* *
* @param $uid * @param $uid
* @param array $urlParam * @param array $urlParam
* @return string * @return array // The full T3 tt-content record.
* @throws \CodeException * @throws \CodeException
* @throws \DbException * @throws \DbException
* @throws \DownloadException
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
* @throws \UserFormException * @throws \UserFormException
* @throws \UserReportException * @throws \UserReportException
*/ */
public function getBodyText($uid, array $urlParam = array()) { public function getBodyText($uid) {
// Copy $urlParam to STORE_SIP
foreach ($urlParam as $key => $paramValue) {
$this->store->setVar($key, $paramValue, STORE_SIP);
}
$column = (is_numeric($uid)) ? 'uid' : 'subheader'; $column = (is_numeric($uid)) ? 'uid' : 'subheader';
$dbT3 = $this->store->getVar(SYSTEM_DB_NAME_T3, STORE_SYSTEM); $dbT3 = $this->store->getVar(SYSTEM_DB_NAME_T3, STORE_SYSTEM);
......
...@@ -370,7 +370,12 @@ class Download { ...@@ -370,7 +370,12 @@ class Download {
* @throws \UserReportException * @throws \UserReportException
*/ */
private function getEvaluatedBodytext($uid, $urlParam) { private function getEvaluatedBodytext($uid, $urlParam) {
$bodyTextArr = $this->db->getBodytext($uid, $urlParam); $bodyTextArr = $this->db->getBodytext($uid);
// Copy $urlParam to STORE_SIP
foreach ($urlParam as $key => $paramValue) {
$this->store->setVar($key, $paramValue, STORE_SIP);
}
$qfq = new QuickFormQuery($bodyTextArr, false, false); $qfq = new QuickFormQuery($bodyTextArr, false, false);
return $qfq->process(); return $qfq->process();
......
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