summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-06-15 22:00:30 +0000
committerDries Buytaert <dries@buytaert.net>2007-06-15 22:00:30 +0000
commit931a4f32dc4841048d088e9f4e61fec89008cd61 (patch)
tree113ee7724db0d52db141b69ccca2776a1dc3bb8d
parent50197a8abcccf1991ce02b4e8bf954c3d38827f3 (diff)
downloadbrdo-931a4f32dc4841048d088e9f4e61fec89008cd61.tar.gz
brdo-931a4f32dc4841048d088e9f4e61fec89008cd61.tar.bz2
- Patch #152171 by yched: added missing validation routines for settings.
-rw-r--r--modules/node/node.module2
-rw-r--r--modules/search/search.module5
-rw-r--r--modules/throttle/throttle.module2
-rw-r--r--modules/upload/upload.module2
4 files changed, 9 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 1423f3c29..ea2bc4088 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -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);
}
diff --git a/modules/search/search.module b/modules/search/search.module
index ce3e8e8ac..8f5abbf44 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -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.'));
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index a23614210..61ab73e5b 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -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);
}
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index b56dfa57b..ab36b6c69 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -242,6 +242,8 @@ function upload_admin_settings() {
);
}
+ $form['#validate'] = array('upload_admin_settings_validate');
+
return system_settings_form($form);
}