summaryrefslogtreecommitdiff
path: root/modules/aggregator/aggregator.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-08-17 17:37:26 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-08-17 17:37:26 +0000
commitd1d52fe47808f3d1b0ce9e3de2f1f05056e5bb1c (patch)
tree193920f31b63f55fc69d92dd44523a7f8951f3da /modules/aggregator/aggregator.module
parent621ec02ee78520d5a630fb473496f58d8065b9d1 (diff)
downloadbrdo-d1d52fe47808f3d1b0ce9e3de2f1f05056e5bb1c.tar.gz
brdo-d1d52fe47808f3d1b0ce9e3de2f1f05056e5bb1c.tar.bz2
Minor code clean-up in aggregator_configure().
Diffstat (limited to 'modules/aggregator/aggregator.module')
-rw-r--r--modules/aggregator/aggregator.module10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index be6976afb..fb8c89b86 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -80,8 +80,7 @@ function aggregator_configure() {
}
$output = '';
- $number = drupal_map_assoc(array(5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100));
- $items = array(0 => t('none'), 3 => t('3 items'), 5 => t('5 items'), 10 => t('10 items'), 15 => t('15 items'), 20 => t('20 items'), 25 => t('25 items'));
+ $items = array(0 => t('none')) + drupal_map_assoc(array(3, 5, 10, 15, 20, 25), '_aggregator_items');
$output .= form_select(t('Items shown in sources and categories pages'), 'aggregator_summary_items', variable_get('aggregator_summary_items', 3), $items, t('The number of items which will be shown with each feed or category in the feed and category summary pages.'));
$output .= form_radios(t('Category selection type'), 'aggregator_category_selector', variable_get('aggregator_category_selector', 'check'), array('check' => t('checkboxes'), 'select' => t('multiple selector')), t('The type of category selection widget which is shown on categorization pages. Checkboxes are easier to use; a multiple selector is good for working with large numbers of categories.'));
@@ -90,6 +89,13 @@ function aggregator_configure() {
}
/**
+ * Helper function for drupal_map_assoc.
+ */
+function _aggregator_items($count) {
+ return format_plural($count, '1 item', '%count items');
+}
+
+/**
* Implementation of hook_perm().
*/
function aggregator_perm() {