This commit is contained in:
Thomas Peterson 2020-01-29 15:13:12 +01:00
parent d75bed7a65
commit c13545527f
3 changed files with 15 additions and 6 deletions

View File

@ -85,7 +85,11 @@ class Calc
if($collection->getName() == "opt") continue; if($collection->getName() == "opt") continue;
if($collection->getFormel() != "") { if($collection->getFormel() != "") {
$formel = $this->formelCalc->parse($collection->getFormel()); $formel = $this->formelCalc->parse($collection->getFormel());
eval('$var = ' . $formel . ';'); if(preg_match("/^[a-z](.*)/", $formel)) {
eval('$var = "' . $formel . '";');
}else{
eval('$var = ' . $formel . ';');
}
}else{ }else{
if(!isset($this->engine->getVariables()[$collection->getName()])) { if(!isset($this->engine->getVariables()[$collection->getName()])) {
$var = 'XXXXXXXXXXXX'; $var = 'XXXXXXXXXXXX';

View File

@ -90,7 +90,12 @@ class CalcValues
if($collection->getName() == "opt") continue; if($collection->getName() == "opt") continue;
if($collection->getFormel() != "") { if($collection->getFormel() != "") {
$formel = $this->formelCalc->parse($collection->getFormel()); $formel = $this->formelCalc->parse($collection->getFormel());
eval('$var = ' . $formel . ';'); if(preg_match("/^[a-z](.*)/", $formel)) {
eval('$var = "' . $formel . '";');
}else{
eval('$var = ' . $formel . ';');
}
}else{ }else{
if(!isset($this->engine->getVariables()[$collection->getName()])) { if(!isset($this->engine->getVariables()[$collection->getName()])) {
$var = 'XXXXXXXX'; $var = 'XXXXXXXX';

View File

@ -693,10 +693,10 @@ if(!function_exists('getSammelformMengenAbschlagPlano')) {
function getMaschine($breite, $hoehe) { function getMaschine($breite, $hoehe) {
if($breite > 49 || $hoehe > 49) { if($breite > 49 || $hoehe > 49) {
return '"kba"'; return 'kba';
} }
return '"gto"'; return 'gto';
} }
function getGeiferRand($format) { function getGeiferRand($format) {