This commit is contained in:
Thomas Peterson 2020-01-29 23:35:16 +00:00
commit 13aa6aa97c
4 changed files with 17 additions and 8 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());
if(preg_match("/^[a-z](.*)/", $formel)) {
eval('$var = "' . $formel . '";');
}else{
eval('$var = ' . $formel . ';'); 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());
if(preg_match("/^[a-z](.*)/", $formel)) {
eval('$var = "' . $formel . '";');
}else{
eval('$var = ' . $formel . ';'); 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

@ -12,7 +12,7 @@ class Template extends Base
/** /**
* @return String * @return String
*/ */
public function getSelect(): String public function getSelect()
{ {
return $this->select; return $this->select;
} }
@ -20,7 +20,7 @@ class Template extends Base
/** /**
* @param String $select * @param String $select
*/ */
public function setSelect(String $select): void public function setSelect($select)
{ {
$this->select = $select; $this->select = $select;
} }

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) {