Add support for DATETIME in attributes (#68)

This commit is contained in:
jekkos
2018-08-16 15:47:51 +02:00
committed by jekkos
parent 98022f3b96
commit 1a490cedf5
16 changed files with 118 additions and 162 deletions

View File

@@ -67,11 +67,17 @@ class Attributes extends Secure_Controller
//Save definition data
$definition_data = array(
'definition_name' => $this->input->post('definition_name'),
'definition_type' => DEFINITION_TYPES[$this->input->post('definition_type')],
'definition_flags' => $definition_flags,
'definition_fk' => $this->input->post('definition_group') != '' ? $this->input->post('definition_group') : NULL
);
$definition_type = empty($this->input->post('definition_type')) ? NULL : $this->input->post('definition_type');
if ($definition_type)
{
$definition_data['definition_type'] = DEFINITION_TYPES[$definition_type];
}
$definition_name = $this->xss_clean($definition_data['definition_name']);
if($this->Attribute->save_definition($definition_data, $definition_id))