summaryrefslogtreecommitdiff
path: root/modules/aggregator/aggregator.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-04-21 13:56:38 +0000
committerDries Buytaert <dries@buytaert.net>2004-04-21 13:56:38 +0000
commit7231c88a326f92bdc2b1579ac6afb8f7f568170b (patch)
treeb7586493410910be188d97440dbdf1d44b084b91 /modules/aggregator/aggregator.module
parent7976678719f6e04ecda315a6088ee0eb3cfb0318 (diff)
downloadbrdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.gz
brdo-7231c88a326f92bdc2b1579ac6afb8f7f568170b.tar.bz2
- Added support for 403 handling. Patch by JonBob. As a side benefit,
administrators will be able to define a custom 403 page, just as they can define 404 pages now. This needs to be documented in the "Changes since / migrating to ..." pages.
Diffstat (limited to 'modules/aggregator/aggregator.module')
-rw-r--r--modules/aggregator/aggregator.module31
1 files changed, 16 insertions, 15 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 8b78b71fd..180569fdf 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -85,27 +85,28 @@ function aggregator_perm() {
return array('administer news feeds', 'access news feeds');
}
+/**
+ * Implementation of hook_link().
+ */
function aggregator_link($type) {
if ($type == 'page' && user_access('access news feeds')) {
return array(l(t('news feeds'), 'aggregator', array('title' => t('Read the latest news from syndicated web sites.'))));
}
if ($type == 'system') {
- if (user_access('administer news feeds')) {
- menu('admin/syndication', t('syndication'), 'aggregator_help_page', 5);
- menu('admin/syndication/news', t('RSS/RDF'), 'aggregator_admin');
- menu('admin/syndication/news/add/feed', t('new feed'), 'aggregator_admin', 2);
- menu('admin/syndication/news/add/bundle', t('new bundle'), 'aggregator_admin', 3);
- menu('admin/syndication/news/tag', t('tag items'), 'aggregator_admin', 4);
- menu('admin/syndication/news/help', t('help'), 'aggregator_help_page', 9);
- }
-
- if (user_access('access news feeds')) {
- menu('aggregator', t('news aggregator'), 'aggregator_page', 5);
- menu('aggregator/feeds', t('news by source'), 'aggregator_page');
- menu('aggregator/bundles', t('news by topic'), 'aggregator_page');
- menu('aggregator/sources', t('news sources'), 'aggregator_page');
- }
+ $access = user_access('administer news feeds');
+ menu('admin/syndication', t('syndication'), $access ? 'aggregator_help_page' : MENU_DENIED, 5);
+ menu('admin/syndication/news', t('RSS/RDF'), $access ? 'aggregator_admin' : MENU_DENIED);
+ menu('admin/syndication/news/add/feed', t('new feed'), $access ? 'aggregator_admin' : MENU_DENIED, 2);
+ menu('admin/syndication/news/add/bundle', t('new bundle'), $access ? 'aggregator_admin' : MENU_DENIED, 3);
+ menu('admin/syndication/news/tag', t('tag items'), $access ? 'aggregator_admin' : MENU_DENIED, 4);
+ menu('admin/syndication/news/help', t('help'), $access ? 'aggregator_help_page' : MENU_DENIED, 9);
+
+ $access = user_access('access news feeds');
+ menu('aggregator', t('news aggregator'), $access ? 'aggregator_page' : MENU_DENIED, 5);
+ menu('aggregator/feeds', t('news by source'), $access ? 'aggregator_page' : MENU_DENIED);
+ menu('aggregator/bundles', t('news by topic'), $access ? 'aggregator_page' : MENU_DENIED);
+ menu('aggregator/sources', t('news sources'), $access ? 'aggregator_page' : MENU_DENIED);
}
}