This fixes #3 to insure that custom/other Data Length/Values can be set.

This commit is contained in:
2016-05-12 02:26:54 +01:00
parent ee2fea1db8
commit 3b774a8385
363 changed files with 368 additions and 363 deletions

View File

@ -1340,6 +1340,7 @@ class Fields extends Structure
$this->queryBuilder[$viewName][$name] = array(
'type' => $field['settings']->datatype,
'lenght' => $field['settings']->datalenght,
'lenght_other' => $field['settings']->datalenght_other,
'default' => $field['settings']->datadefault,
'other' => $field['settings']->datadefault_other,
'null_switch' => $field['settings']->null_switch);

View File

@ -4647,7 +4647,11 @@ class Interpretation extends Fields
}
// set the lenght
$lenght = '';
if (isset($data['lenght']) && $data['lenght'] > 0)
if ($data['lenght'] == 'Other' && isset($data['lenght_other']) && $data['lenght_other'] > 0)
{
$lenght = '('.$data['lenght_other'].')';
}
elseif (isset($data['lenght']) && $data['lenght'] > 0)
{
$lenght = '('.$data['lenght'].')';
}