summaryrefslogtreecommitdiff
path: root/modules/aggregator.module
diff options
context:
space:
mode:
authorGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-28 09:52:57 +0000
committerGerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>2006-04-28 09:52:57 +0000
commit4f7ba52bed7d222a8f4e638465f87de85093666a (patch)
tree09d54f2c72130584d5fd2a23e4271d727b6c356c /modules/aggregator.module
parent954cbf7c65f70c3fe1f866198c09561253aab62a (diff)
downloadbrdo-4f7ba52bed7d222a8f4e638465f87de85093666a.tar.gz
brdo-4f7ba52bed7d222a8f4e638465f87de85093666a.tar.bz2
#56036, aggregator_menu messed up, patch by tenrapid
Diffstat (limited to 'modules/aggregator.module')
-rw-r--r--modules/aggregator.module23
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module
index df6a53ed7..772cffde8 100644
--- a/modules/aggregator.module
+++ b/modules/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 = '<div class="feed-source">';
$output .= theme('feed_icon', $feed->url) ."\n";
- $output .= $feed->image . ' <h3 class="feed-title"><a href="'. check_url($feed->link) .'">'. check_plain($feed->title) ."</a></h3>\n";
- $output .= '<div class="feed-description"><em>'. t('Description:') .'</em> '. aggregator_filter_xss($feed->description) ."</div>\n";
+ $output .= $feed->image;
+ $output .= '<div class="feed-description">'. aggregator_filter_xss($feed->description) ."</div>\n";
+ $output .= '<div class="feed-url"><em>'. t('URL:') .'</em> '. l($feed->link, $feed->link, array(), NULL, NULL, TRUE) ."</div>\n";
$updated = t('%time ago', array('%time' => format_interval(time() - $feed->checked)));
if (user_access('administer news feeds')) {