Commit b825d453 authored by Elias Villiger's avatar Elias Villiger
Browse files

Bug 6281: Record-Store wird zwischengespeichert und nach Ausführen des...

Bug 6281: Record-Store wird zwischengespeichert und nach Ausführen des form-Reports wiederhergestellt. fillFormStoreRecord kann deshalb immer auf true gesetzt sein -> Variabel gelöscht. Bug ist damit behoben.
parent 62a8f97c
...@@ -493,8 +493,10 @@ abstract class AbstractBuildForm { ...@@ -493,8 +493,10 @@ abstract class AbstractBuildForm {
* @return array|string * @return array|string
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
* @throws DownloadException
* @throws UserFormException * @throws UserFormException
* @throws UserReportException * @throws UserReportException
* @throws DownloadException
*/ */
private function processReportSyntax($value) { private function processReportSyntax($value) {
...@@ -509,7 +511,7 @@ abstract class AbstractBuildForm { ...@@ -509,7 +511,7 @@ abstract class AbstractBuildForm {
return $new; return $new;
} }
if (substr($value, 0, 8) == SHEBANG_REPORT) { if (substr($value, 0, strlen(SHEBANG_REPORT)) == SHEBANG_REPORT) {
if ($this->report === null) { if ($this->report === null) {
$this->report = new Report(array(), $this->evaluate, false); $this->report = new Report(array(), $this->evaluate, false);
} }
...@@ -519,7 +521,7 @@ abstract class AbstractBuildForm { ...@@ -519,7 +521,7 @@ abstract class AbstractBuildForm {
} }
$storeRecord = $this->store->getStore(STORE_RECORD); $storeRecord = $this->store->getStore(STORE_RECORD);
$value = $this->report->process($this->bodytextParser->process($value), false); $value = $this->report->process($this->bodytextParser->process($value));
$this->store->setStore($storeRecord, STORE_RECORD, true); $this->store->setStore($storeRecord, STORE_RECORD, true);
$this->store->setVar(SYSTEM_REPORT_FULL_LEVEL, '', STORE_SYSTEM); $this->store->setVar(SYSTEM_REPORT_FULL_LEVEL, '', STORE_SYSTEM);
} }
......
...@@ -116,8 +116,6 @@ class Report { ...@@ -116,8 +116,6 @@ class Report {
private $showDebugInfoFlag = false; private $showDebugInfoFlag = false;
private $flagFillStoreRecord = true;
/** /**
* Report constructor. * Report constructor.
* *
...@@ -214,7 +212,6 @@ class Report { ...@@ -214,7 +212,6 @@ class Report {
* Main function. Parses bodytext and iterates over all queries. * Main function. Parses bodytext and iterates over all queries.
* *
* @param $bodyText * @param $bodyText
* @param bool $flagFillStoreRecord
* @return string * @return string
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
...@@ -222,13 +219,12 @@ class Report { ...@@ -222,13 +219,12 @@ class Report {
* @throws UserFormException * @throws UserFormException
* @throws UserReportException * @throws UserReportException
*/ */
public function process($bodyText, $flagFillStoreRecord = true) { public function process($bodyText) {
//phpUnit Test: clean environment //phpUnit Test: clean environment
$this->frArray = array(); $this->frArray = array();
$this->indexArray = array(); $this->indexArray = array();
$this->levelCount = 0; $this->levelCount = 0;
$this->flagFillStoreRecord = $flagFillStoreRecord;
// Iteration over Bodytext // Iteration over Bodytext
$ttLineArray = explode("\n", $bodyText); $ttLineArray = explode("\n", $bodyText);
...@@ -311,7 +307,7 @@ class Report { ...@@ -311,7 +307,7 @@ class Report {
$this->frArray[$level . "." . $frCmd] = $value; $this->frArray[$level . "." . $frCmd] = $value;
// per sql command // per sql command
//pro sql cmd wir der Indexarray abgefüllt. Dieser wird später verwendet um auf den $frArray zuzugreifen //pro sql cmd wird der Indexarray abgefüllt. Dieser wird später verwendet um auf den $frArray zuzugreifen
//if(preg_match("/^sql/i", $frCmd) == 1){ //if(preg_match("/^sql/i", $frCmd) == 1){
// if ($frCmd === TOKEN_FORM || $frCmd === TOKEN_SQL) { // if ($frCmd === TOKEN_FORM || $frCmd === TOKEN_SQL) {
if ($frCmd === TOKEN_SQL) { if ($frCmd === TOKEN_SQL) {
...@@ -663,9 +659,7 @@ class Report { ...@@ -663,9 +659,7 @@ class Report {
} }
} }
if ($this->flagFillStoreRecord) { $this->store->appendToStore($assoc, STORE_RECORD);
$this->store->appendToStore($assoc, STORE_RECORD);
}
return ($content); return ($content);
} }
......
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