Commit 931a4f32 authored by Dries's avatar Dries
Browse files

- Patch #152171 by yched: added missing validation routines for settings.

parent 50197a8a
......@@ -1060,6 +1060,8 @@ function node_configure() {
'#options' => array(t('Optional'), t('Required')), '#description' => t('Must users preview posts before submitting?')
);
$form['#validate'] = array('node_configure_validate');
return system_settings_form($form);
}
......
......@@ -251,9 +251,10 @@ function search_admin_settings() {
$form['indexing_settings']['minimum_word_size'] = array('#type' => 'textfield', '#title' => t('Minimum word length to index'), '#default_value' => variable_get('minimum_word_size', 3), '#size' => 5, '#maxlength' => 3, '#description' => t('The number of characters a word has to be to be indexed. A lower setting means better search result ranking, but also a larger database. Each search query must contain at least one keyword that is this size (or longer).'));
$form['indexing_settings']['overlap_cjk'] = array('#type' => 'checkbox', '#title' => t('Simple CJK handling'), '#default_value' => variable_get('overlap_cjk', TRUE), '#description' => t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'));
$form['#validate'] = array('search_admin_settings_validate');
// Per module settings
$form = array_merge($form, module_invoke_all('search', 'admin'));
return system_settings_form($form);
}
......@@ -268,7 +269,7 @@ function search_wipe_confirm() {
/**
* Handler for wipe confirmation
*/
function search_wipe_confirm_submit(&$form, $form, &$form_state) {
function search_wipe_confirm_submit(&$form, &$form_state) {
if ($form['confirm']) {
search_wipe();
drupal_set_message(t('The index will be rebuilt.'));
......
......@@ -153,6 +153,8 @@ function throttle_admin_settings() {
'#description' => t('The auto-throttle probability limiter is an efficiency mechanism to statistically reduce the overhead of the auto-throttle. The limiter is expressed as a percentage of page views, so for example if set to the default of 10% we only perform the extra database queries to update the throttle status 1 out of every 10 page views. The busier your site, the lower you should set the limiter value.')
);
$form['#validate'] = array('throttle_admin_settings_validate');
return system_settings_form($form);
}
......
......@@ -242,6 +242,8 @@ function upload_admin_settings() {
);
}
$form['#validate'] = array('upload_admin_settings_validate');
return system_settings_form($form);
}
......
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