From 4f7ba52bed7d222a8f4e638465f87de85093666a Mon Sep 17 00:00:00 2001 From: Gerhard Killesreiter Date: Fri, 28 Apr 2006 09:52:57 +0000 Subject: #56036, aggregator_menu messed up, patch by tenrapid --- modules/aggregator/aggregator.module | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'modules/aggregator/aggregator.module') diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index df6a53ed7..772cffde8 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -75,6 +75,7 @@ function aggregator_menu($may_cache) { 'title' => t('list'), 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); + $items[] = array('path' => 'aggregator', 'title' => t('news aggregator'), 'callback' => 'aggregator_page_last', @@ -99,6 +100,14 @@ function aggregator_menu($may_cache) { 'callback' => 'aggregator_page_opml', 'access' => $view, 'type' => MENU_CALLBACK); + + $result = db_query('SELECT title, cid FROM {aggregator_category} ORDER BY title'); + while ($category = db_fetch_array($result)) { + $items[] = array('path' => 'aggregator/categories/'. $category['cid'], + 'title' => $category['title'], + 'callback' => 'aggregator_page_category', + 'access' => $view); + } } else { if (arg(0) == 'aggregator' && is_numeric(arg(2))) { @@ -106,9 +115,10 @@ function aggregator_menu($may_cache) { $feed = aggregator_get_feed(arg(2)); if ($feed) { $items[] = array('path' => 'aggregator/sources/'. $feed['fid'], - 'title' => $feed->title, + 'title' => $feed['title'], 'callback' => 'aggregator_page_source', - 'access' => $view); + 'access' => $view, + 'type' => MENU_CALLBACK); $items[] = array('path' => 'aggregator/sources/'. $feed['fid'] .'/view', 'title' => t('view'), 'type' => MENU_DEFAULT_LOCAL_TASK, @@ -130,10 +140,6 @@ function aggregator_menu($may_cache) { else if (arg(1) == 'categories') { $category = aggregator_get_category(arg(2)); if ($category) { - $items[] = array('path' => 'aggregator/categories/'. $category['cid'], - 'title' => $category->title, - 'callback' => 'aggregator_page_category', - 'access' => $view); $items[] = array('path' => 'aggregator/categories/'. $category['cid'] .'/view', 'title' => t('view'), 'type' => MENU_DEFAULT_LOCAL_TASK, @@ -1254,8 +1260,9 @@ function aggregator_page_categories() { function theme_aggregator_feed($feed) { $output = '
'; $output .= theme('feed_icon', $feed->url) ."\n"; - $output .= $feed->image . '

'. check_plain($feed->title) ."

\n"; - $output .= '
'. t('Description:') .' '. aggregator_filter_xss($feed->description) ."
\n"; + $output .= $feed->image; + $output .= '
'. aggregator_filter_xss($feed->description) ."
\n"; + $output .= '
'. t('URL:') .' '. l($feed->link, $feed->link, array(), NULL, NULL, TRUE) ."
\n"; $updated = t('%time ago', array('%time' => format_interval(time() - $feed->checked))); if (user_access('administer news feeds')) { -- cgit v1.2.3