Commit 8fa8d496 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Date/Time validation, during save, did not respect formelement dateFormat specs.

FillStoreForm.php: added HelperFormElement::explodeParameterInArrayElements($feSpecNative);
parent 19fefdf8
......@@ -41,7 +41,7 @@ const RETURN_ARRAY = 'return_array';
const SQL_FORM_ELEMENT_SPECIFIC_CONTAINER = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.feIdContainer = ? AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_ALL_CONTAINER = "SELECT *, ? AS 'nestedInFieldSet' FROM FormElement AS fe WHERE fe.formId = ? AND fe.deleted = 'no' AND FIND_IN_SET(fe.class, ? ) AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_SIMPLE_ALL_CONTAINER = "SELECT fe.id, fe.name, fe.label, fe.type, fe.checkType, fe.checkPattern, fe.mode FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
const SQL_FORM_ELEMENT_SIMPLE_ALL_CONTAINER = "SELECT fe.id, fe.name, fe.label, fe.type, fe.checkType, fe.checkPattern, fe.mode, fe.parameter FROM FormElement AS fe, Form AS f WHERE f.name = ? AND f.id = fe.formId AND fe.deleted = 'no' AND fe.class = 'native' AND fe.enabled='yes' ORDER BY fe.ord, fe.id";
// SANITIZE Classifier
const SANITIZE_ALLOW_ALNUMX = "alnumx";
......
......@@ -59,6 +59,8 @@ class FillStoreForm {
throw new UserFormException('Form not found or multiple forms with the same name.', ERROR_FORM_NOT_FOUND);
}
HelperFormElement::explodeParameterInArrayElements($feSpecNative);
return $feSpecNative;
}
......@@ -104,6 +106,10 @@ class FillStoreForm {
// Preparation for Log, Debug
$this->store->setVar(SYSTEM_FORM_ELEMENT, Logger::formatFormElementName($formElement), STORE_SYSTEM);
// evaluate current FormElement
// $evaluate = new Evaluate($this->store, $this->db);
// $formElement = $evaluate->parseArray($fe, $debugStack);
// Get related formElement.
// construct the field name used in the form
$clientFieldName = HelperFormElement::buildFormElementId($formElement['name'], $sipValues[SIP_RECORD_ID]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment