Index: branches/5.2.x/core/units/configuration/configuration_config.php =================================================================== diff -u -N -r15012 -r15471 --- branches/5.2.x/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 15012) +++ branches/5.2.x/core/units/configuration/configuration_config.php (.../configuration_config.php) (revision 15471) @@ -1,6 +1,6 @@ Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), 'EventHandlerClass' => Array ('class' => 'ConfigurationEventHandler', 'file' => 'configuration_event_handler.php', 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array ('class' => 'ConfigurationTagProcessor', 'file' => 'configuration_tag_processor.php', 'build_event' => 'OnBuild'), + 'ValidatorClass' => 'ConfigurationValidator', 'AutoLoad' => true, + 'RegisterClasses' => Array ( + Array ('pseudo' => 'ConfigurationValidator', 'class' => 'ConfigurationValidator', 'file' => 'configuration_validator.php', 'build_event' => ''), + ), + 'QueryString' => Array ( 1 => 'id', 2 => 'Page', @@ -45,6 +50,12 @@ 'config_list_users' => Array ('prefixes' => Array ('conf_List'), 'format' => "!la_updating_config!"), 'section_label' => Array ('prefixes' => Array ('conf_List'), 'format' => "#section_label#"), + + 'config_edit' => Array ( + 'new_status_labels' => Array ('conf' => '!la_title_AddingSystemSetting!'), + 'edit_status_labels' => Array ('conf' => '!la_title_EditingSystemSetting!'), + 'prefixes' => Array ('conf'), 'format' => "#conf_status# '#conf_titlefield#'", + ), ), 'TableName' => TABLE_PREFIX . 'SystemSettings', @@ -61,17 +72,49 @@ 'Fields' => Array ( 'VariableId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'VariableName' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'VariableName' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'regexp' => '/^[a-z0-9_]+$/i', + 'not_null' => 1, 'required' => 1, 'default' => '' + ), 'VariableValue' => Array ('type' => 'string', 'default' => NULL), - 'ModuleOwner' => Array ('type' => 'string', 'default' => 'In-Portal'), - 'Section' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Heading' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Prompt' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'ElementType' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), + 'ModuleOwner' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array (), + 'required' => 1, 'default' => 'In-Portal' + ), + 'Section' => Array ( + 'type' => 'string', + 'error_msgs' => Array ('unknown_section' => '!la_error_UnknownSection!'), + 'not_null' => 1, 'required' => 1, 'default' => '' + ), + 'Heading' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'regexp' => '/^la_section_[A-Z\d:_\-\.]+$/i', + 'not_null' => 1, 'required' => 1, 'default' => '' + ), + 'Prompt' => Array ( + 'type' => 'string', + 'formatter' => 'kFormatter', 'regexp' => '/^la_config_[A-Z\d:_\-\.]+$/i', + 'not_null' => 1, 'required' => 1, 'default' => '' + ), + 'ElementType' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => Array ('text' => 'la_type_text', 'select' => 'la_type_select', 'multiselect' => 'la_type_multiselect', 'radio' => 'la_type_radio', 'checkbox' => 'la_type_checkbox', 'password' => 'la_type_password', 'textarea' => 'la_type_textarea'), 'use_phrases' => 1, + 'not_null' => 1, 'required' => 1, 'default' => '' + ), 'Validation' => Array ('type' => 'string', 'default' => NULL), 'ValueList' => Array ('type' => 'string', 'default' => NULL), - 'DisplayOrder' => Array ('type' => 'float', 'not_null' => 1, 'default' => 0), - 'GroupDisplayOrder' => Array ('type' => 'float', 'not_null' => 1, 'default' => 0), + 'DisplayOrder' => Array ( + 'type' => 'float', + 'unique' => Array ('ModuleOwner', 'Section', 'GroupDisplayOrder'), + 'not_null' => 1, 'required' => 1, 'default' => 0 + ), + 'GroupDisplayOrder' => Array ( + 'type' => 'float', + 'unique' => Array ('ModuleOwner', 'Section', 'DisplayOrder'), + 'not_null' => 1, 'required' => 1, 'default' => 0 + ), 'Install' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1), 'HintLabel' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL), ),