diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-24 21:36:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-24 21:36:22 +0000 |
commit | e22b2153a2a83b1d1eca60c62703514cd09a55aa (patch) | |
tree | 3a15f99951e57c3409b5dddb2729bb4ff368da0a /modules/aggregator | |
parent | 01f5742f19d0731aa28da41a220db0386eb4ce32 (diff) | |
download | brdo-e22b2153a2a83b1d1eca60c62703514cd09a55aa.tar.gz brdo-e22b2153a2a83b1d1eca60c62703514cd09a55aa.tar.bz2 |
- Patch #140783 by sun: a select list without #default_value() always passes form validation.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.processor.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/aggregator/aggregator.processor.inc b/modules/aggregator/aggregator.processor.inc index 2888e2fa6..a7a87dd15 100644 --- a/modules/aggregator/aggregator.processor.inc +++ b/modules/aggregator/aggregator.processor.inc @@ -70,7 +70,7 @@ function aggregator_aggregator_remove($feed) { function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) { if (in_array('aggregator', variable_get('aggregator_processors', array('aggregator')))) { $info = module_invoke('aggregator', 'aggregator_process', 'info'); - $items = array(0 => t('none')) + drupal_map_assoc(array(3, 5, 10, 15, 20, 25), '_aggregator_items'); + $items = drupal_map_assoc(array(3, 5, 10, 15, 20, 25), '_aggregator_items'); $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval'); $period[AGGREGATOR_CLEAR_NEVER] = t('Never'); @@ -90,8 +90,10 @@ function aggregator_form_aggregator_admin_form_alter(&$form, $form_state) { $form['modules']['aggregator']['aggregator_summary_items'] = array( '#type' => 'select', - '#title' => t('Number of items shown in listing pages') , + '#title' => t('Number of items shown in listing pages'), + '#required' => FALSE, '#default_value' => variable_get('aggregator_summary_items', 3), + '#empty_value' => 0, '#options' => $items, ); |