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

FormBuildPlain: Variables renamed to be more clear.

parent 595a1d2a
...@@ -714,25 +714,22 @@ class FormBuildPlain { ...@@ -714,25 +714,22 @@ class FormBuildPlain {
private function getSubrecordColumnControl($titleRaw) { private function getSubrecordColumnControl($titleRaw) {
$control = array(); $control = array();
for ($ii = 0; $ii < count($titleRaw); $ii++) { foreach ($titleRaw AS $col) {
// foreach ($titleRaw AS $col) {
$col = $titleRaw[$ii];
$control['width'][$col] = SUBRECORD_COLUMN_WIDTH; $control['width'][$col] = SUBRECORD_COLUMN_WIDTH;
// a) 'City@width=40', b) 'Status@icon', c) 'Mailto@width=80@nostrip' // a) 'City@width=40', b) 'Status@icon', c) 'Mailto@width=80@nostrip'
$arr = qfq\helper\KeyValueStringParser::parse($titleRaw[$ii], '=', '@', IF_VALUE_EMPTY_COPY_KEY); $arr = qfq\helper\KeyValueStringParser::parse($col, '=', '@', IF_VALUE_EMPTY_COPY_KEY);
foreach ($arr as $key => $value) { foreach ($arr as $attribute => $value) {
switch ($key) { switch ($attribute) {
case 'width': case 'width':
case 'nostrip': case 'nostrip':
case 'icon': case 'icon':
break; break;
default: default:
$key = 'title'; $attribute = 'title';
break; break;
} }
$control[$key][$col] = $value; $control[$attribute][$col] = $value;
} }
} }
return $control; return $control;
......
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