more flexible <select> declaration

fix array export in ConfigFile
This commit is contained in:
Crack
2010-07-03 13:45:48 +02:00
parent b13dee72f3
commit 49c2562eae
4 changed files with 11 additions and 8 deletions

View File

@@ -88,7 +88,13 @@ class Form
trigger_error("$option_path - not a static value list", E_USER_ERROR);
return array();
}
return $value;
// convert value list array('a', 'b') to array('a' => 'a', 'b' => 'b')
// and array('#', 'a', 'b') to array('a', 'b')
if ($value[0] == '#') {
array_shift($value);
return $value;
}
return array_combine($value, $value);
}
/**