Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Jan 19, 2024
1 parent 6e0f2d2 commit b6ba62e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1169,17 +1169,14 @@ public function execute($_options = array()) {
$info = floatval($info);
}
}
if(count($infos) == 3){
$datas = array($infos[0] => array($infos[1] => $infos[2]));
}else{
$datas = array($infos[0] => $infos[1]);
}
}
if ($this->getSubtype() == 'color' && isset($color)) {
$datas = array('color' => $color);
} else {
if(strpos($logicalId,'json::') !== 0){
if(count($infos) == 3){
$datas = array($infos[0] => array($infos[1] => $infos[2]));
}else{
$datas = array($infos[0] => $infos[1]);
}
}
}
if(isset($datas['position'])){
$datas['position'] = round(floatval($datas['position']), 2);
Expand Down

0 comments on commit b6ba62e

Please sign in to comment.