--- aggregator.module 2005-02-02 13:09:02.000000000 -0500 +++ aggregator.new 2005-02-02 13:08:49.000000000 -0500 @@ -80,6 +80,8 @@ function aggregator_configure() { $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.')); + $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval'); + $output .= form_select(t('Discard aggregator items older than'), 'aggregator_flush_item_timer', variable_get('aggregator_flush_item_timer', 9676800), $period, t('Older aggregator items will be automatically discarded. Requires crontab.')); print theme('page', system_settings_form($output)); } @@ -567,10 +569,10 @@ function aggregator_parse_feed(&$data, $ } /* - ** Remove all items that are older than 3 months: + ** Remove all items that are older than flush item timer: */ - $age = time() - 8035200; // 60 * 60 * 24 * 31 * 3 + $age = time() - variable_get('aggregator_flush_item_timer', 9676800); $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = %d AND timestamp < %d', $feed['fid'], $age); if (db_num_rows($result)) {