Commit bd6efa0f authored by Carsten  Rose's avatar Carsten Rose
Browse files

Feature #4720 - Implemented select-list with dbIndexList as FE.parameter...

Feature #4720 - Implemented select-list with dbIndexList as FE.parameter option. Works, but is unflexible. Looking for a better solution.
parent 89162ba2
......@@ -34,9 +34,6 @@ qfq.zip:
clean:
cd doc/diagram ; $(MAKE) $@
update-qfq-doc:
rsync -av --delete --exclude=_make --exclude=_static extension/Documentation/ ../qfq-doc/Documentation/
git-revision: make-dist-dir
echo $(GIT_REVISION_LONG) > $(DISTDIR)/revision.git
......
......@@ -568,11 +568,27 @@ abstract class AbstractBuildForm {
$this->store->appendToStore($fe[FE_FILL_STORE_VAR], STORE_VAR);
}
// In case the FormElement List, defined in SQL1, needs a different Database:
if (!empty($fe[FE_DB_INDEX_LIST]) && !empty($fe[FE_SQL1])) {
$feSql1 = $fe[FE_SQL1];
$fe[FE_SQL1] = '';
}
// ** evaluate current FormElement **
$formElement = $this->evaluate->parseArray($fe, $skip, $debugStack);
$formElement = HelperFormElement::setLanguage($formElement, $parameterLanguageFieldName);
if (!empty($feSql1)) {
// Has to be done after parseArray(), cause $formElement[FE_DB_INDEX_LIST] needs to be evaluated first.
$dbList = new Database($formElement[FE_DB_INDEX_LIST]);
$evalList = new Evaluate($this->store, $dbList);
$dataSql1 = $evalList->parse($feSql1);
$formElement[FE_SQL1] = $dataSql1;
unset($dbList);
unset($evalList);
}
// Some Defaults
$formElement = Support::setFeDefaults($formElement, $this->formSpec);
......
......@@ -795,6 +795,7 @@ const F_PARAMETER = 'parameter'; // valid for F_ and FE_
// Form columns: via parameter field
const F_DB_INDEX = 'dbIndex';
const FE_DB_INDEX_LIST = 'dbIndexList';
const DB_INDEX_DEFAULT = "1";
const PARAM_DB_INDEX_DATA = '__dbIndexData'; // Submitted via SIP to make record locking DB aware.
......
Markdown is supported
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