Skip to content

Commit

Permalink
Enhances list module library items management in MLDatabaseItem library.
Browse files Browse the repository at this point in the history
  • Loading branch information
JB Lebrun committed Oct 25, 2018
1 parent ffda384 commit ec422cc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions engine/lib/object/MLDatabaseItem.php.inc
Expand Up @@ -4,9 +4,9 @@
* @details Engine / Object Library * @details Engine / Object Library
* @file engine/lib/object/MLDatabaseItem.php.inc * @file engine/lib/object/MLDatabaseItem.php.inc
* @author CaMykS Team <camyks.contact@gmail.com> * @author CaMykS Team <camyks.contact@gmail.com>
* @version 1.0 * @version 1.0.1
* @date Creation: Apr 2007 * @date Creation: Apr 2007
* @date Modification: Apr 2018 * @date Modification: Oct 2018
* @copyright 2007 - 2018 CaMykS Team * @copyright 2007 - 2018 CaMykS Team
* @note This program is distributed as is - WITHOUT ANY WARRANTY; * @note This program is distributed as is - WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Expand Down Expand Up @@ -34,7 +34,7 @@ class MLDatabaseItem extends ModuleLibraryItem {
* @brief Secondary information of item data description. * @brief Secondary information of item data description.
*/ */
public $datadesc2; public $datadesc2;

/** /**
* Class constructor. * Class constructor.
* @param string $name * @param string $name
Expand Down Expand Up @@ -90,6 +90,11 @@ class MLDatabaseItem extends ModuleLibraryItem {
case 'float': case 'float':
$this->value = preg_replace('/,/', '.', (float)preg_replace('/,/', '.', $this->get_valueFromHeader($name))); $this->value = preg_replace('/,/', '.', (float)preg_replace('/,/', '.', $this->get_valueFromHeader($name)));
break; break;
case 'list':
$this->value = $this->get_valueFromHeader($name);
if (is_string($this->value))
$this->value = explode(',', $this->value);
break;
default: default:
$this->value = $this->get_valueFromHeader($name); $this->value = $this->get_valueFromHeader($name);
break; break;
Expand Down

0 comments on commit ec422cc

Please sign in to comment.