From 53818e811e7c699a00e53f9dfe539e000677d734 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 5 Sep 2007 08:31:48 +0000 Subject: - Patch #172835 by Crell: split up aggregator module. --- modules/aggregator/aggregator.module | 674 ++--------------------------------- 1 file changed, 25 insertions(+), 649 deletions(-) (limited to 'modules/aggregator/aggregator.module') diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 464573af1..c78422a75 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -32,18 +32,22 @@ function aggregator_theme() { return array( 'aggregator_page_list' => array( 'arguments' => array('form' => NULL), + 'file' => 'aggregator.pages.inc', ), 'aggregator_feed' => array( 'arguments' => array('feed' => NULL), + 'file' => 'aggregator.pages.inc', ), 'aggregator_block_item' => array( 'arguments' => array('item' => NULL, 'feed' => 0), ), 'aggregator_summary_item' => array( 'arguments' => array('item' => NULL), + 'file' => 'aggregator.pages.inc', ), 'aggregator_page_item' => array( 'arguments' => array('item' => NULL), + 'file' => 'aggregator.pages.inc', ), ); } @@ -57,6 +61,7 @@ function aggregator_menu() { 'description' => "Configure which content your site aggregates from other sites, how often it polls them, and how they're categorized.", 'page callback' => 'aggregator_admin_overview', 'access arguments' => array('administer news feeds'), + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/add/feed'] = array( 'title' => 'Add feed', @@ -65,6 +70,7 @@ function aggregator_menu() { 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, 'parent' => 'admin/content/aggregator', + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/add/category'] = array( 'title' => 'Add category', @@ -73,6 +79,7 @@ function aggregator_menu() { 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, 'parent' => 'admin/content/aggregator', + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/remove/%aggregator_feed'] = array( 'title' => 'Remove items', @@ -80,6 +87,7 @@ function aggregator_menu() { 'page arguments' => array(4), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/update/%aggregator_feed'] = array( 'title' => 'Update items', @@ -87,6 +95,7 @@ function aggregator_menu() { 'page arguments' => array(4), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/list'] = array( 'title' => 'List', @@ -100,33 +109,40 @@ function aggregator_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 10, 'access arguments' => array('administer news feeds'), + 'file' => 'aggregator.admin.inc', ); $items['aggregator'] = array( 'title' => 'News aggregator', 'page callback' => 'aggregator_page_last', 'access arguments' => array('access news feeds'), 'weight' => 5, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/sources'] = array( 'title' => 'Sources', 'page callback' => 'aggregator_page_sources', - 'access arguments' => array('access news feeds')); + 'access arguments' => array('access news feeds'), + 'file' => 'aggregator.pages.inc', + ); $items['aggregator/categories'] = array( 'title' => 'Categories', 'page callback' => 'aggregator_page_categories', 'access callback' => '_aggregator_has_categories', + 'file' => 'aggregator.pages.inc', ); $items['aggregator/rss'] = array( 'title' => 'RSS feed', 'page callback' => 'aggregator_page_rss', 'access arguments' => array('access news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/opml'] = array( 'title' => 'OPML feed', 'page callback' => 'aggregator_page_opml', 'access arguments' => array('access news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/categories/%aggregator_category'] = array( 'title callback' => '_aggregator_category_title', @@ -135,6 +151,7 @@ function aggregator_menu() { 'page arguments' => array(2), 'access callback' => 'user_access', 'access arguments' => array('access news feeds'), + 'file' => 'aggregator.pages.inc', ); $items['aggregator/categories/%aggregator_category/view'] = array( 'title' => 'View', @@ -147,6 +164,7 @@ function aggregator_menu() { 'page arguments' => array('aggregator_page_category', 2), 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/categories/%aggregator_category/configure'] = array( 'title' => 'Configure', @@ -155,11 +173,13 @@ function aggregator_menu() { 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, 'weight' => 1, + 'file' => 'aggregator.admin.inc', ); $items['aggregator/sources/%aggregator_feed'] = array( 'page callback' => 'aggregator_page_source', 'page arguments' => array(2), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/sources/%aggregator_feed/view'] = array( 'title' => 'View', @@ -172,6 +192,7 @@ function aggregator_menu() { 'page arguments' => array('aggregator_page_source', 2), 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, + 'file' => 'aggregator.pages.inc', ); $items['aggregator/sources/%aggregator_feed/configure'] = array( 'title' => 'Configure', @@ -180,6 +201,7 @@ function aggregator_menu() { 'access arguments' => array('administer news feeds'), 'type' => MENU_LOCAL_TASK, 'weight' => 1, + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/edit/feed/%aggregator_feed'] = array( 'title' => 'Edit feed', @@ -187,6 +209,7 @@ function aggregator_menu() { 'page arguments' => array('aggregator_form_feed', 5), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.admin.inc', ); $items['admin/content/aggregator/edit/category/%aggregator_category'] = array( 'title' => 'Edit category', @@ -194,6 +217,7 @@ function aggregator_menu() { 'page arguments' => array('aggregator_form_category', 5), 'access arguments' => array('administer news feeds'), 'type' => MENU_CALLBACK, + 'file' => 'aggregator.admin.inc', ); return $items; @@ -211,36 +235,7 @@ function _aggregator_has_categories() { return user_access('access news feeds') && db_result(db_query('SELECT COUNT(*) FROM {aggregator_category}')); } -function aggregator_admin_settings() { - $items = array(0 => t('none')) + 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'); - - $form['aggregator_allowed_html_tags'] = array( - '#type' => 'textfield', '#title' => t('Allowed HTML tags'), '#size' => 80, '#maxlength' => 255, - '#default_value' => variable_get('aggregator_allowed_html_tags', '