summaryrefslogtreecommitdiff
path: root/modules/archive
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/archive
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/archive')
-rw-r--r--modules/archive/archive.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/archive/archive.module b/modules/archive/archive.module
index 8fd216d49..ed4be574f 100644
--- a/modules/archive/archive.module
+++ b/modules/archive/archive.module
@@ -182,18 +182,18 @@ function archive_block($op = "list", $delta = 0) {
}
}
+/**
+ * Implementation of hook_link().
+ */
function archive_link($type) {
-
$links = array();
- if ($type == "page" && user_access("access content")) {
- $links[] = l(t("archives"), "archive", array("title" => t("Read the older content in our archive.")));
+ if ($type == 'page' && user_access('access content')) {
+ $links[] = l(t('archives'), 'archive', array('title' => t('Read the older content in our archive.')));
}
- if ($type == "system") {
- if (user_access("access content")) {
- menu("archive", t("archives"), "archive_page", 0, MENU_HIDE);
- }
+ if ($type == 'system') {
+ menu('archive', t('archives'), user_access('access content') ? 'archive_page' : MENU_DENIED, 0, MENU_HIDE);
}
return $links;