Merge branch 'master' of https://gitlab.com/printshopcreator/calc
This commit is contained in:
commit
13aa6aa97c
@ -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';
|
||||||
|
|||||||
@ -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';
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user