summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-11-24 22:56:21 +0000
committerDries Buytaert <dries@buytaert.net>2004-11-24 22:56:21 +0000
commit4726c93156e59e0b44faf55845c3f97cf00a9168 (patch)
tree1aa1e96b3bd00735c1fd3663502a920a2e01f2e5
parent4e4e2aa7770a43c27a421b3f759160094f7d3191 (diff)
downloadbrdo-4726c93156e59e0b44faf55845c3f97cf00a9168.tar.gz
brdo-4726c93156e59e0b44faf55845c3f97cf00a9168.tar.bz2
- Patch #13443 by Moshe: got rid of the semi-implemented 'page link' feature. All themes currently support primary and secondary links so page links are now deprecated. Check your contributed modules and update them accordingly.
-rw-r--r--modules/aggregator.module9
-rw-r--r--modules/aggregator/aggregator.module9
-rw-r--r--modules/archive.module12
-rw-r--r--modules/archive/archive.module12
-rw-r--r--modules/blog.module4
-rw-r--r--modules/blog/blog.module4
-rw-r--r--modules/book.module6
-rw-r--r--modules/book/book.module6
-rw-r--r--modules/forum.module4
-rw-r--r--modules/forum/forum.module4
-rw-r--r--modules/poll.module13
-rw-r--r--modules/poll/poll.module13
-rw-r--r--modules/search.module13
-rw-r--r--modules/search/search.module13
-rw-r--r--modules/statistics.module8
-rw-r--r--modules/statistics/statistics.module8
16 files changed, 4 insertions, 134 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module
index b578bb79f..b9436b975 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -108,15 +108,6 @@ function aggregator_perm() {
}
/**
- * 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.'))));
- }
-}
-
-/**
* Implementation of hook_menu().
*/
function aggregator_menu($may_cache) {
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index b578bb79f..b9436b975 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -108,15 +108,6 @@ function aggregator_perm() {
}
/**
- * 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.'))));
- }
-}
-
-/**
* Implementation of hook_menu().
*/
function aggregator_menu($may_cache) {
diff --git a/modules/archive.module b/modules/archive.module
index e4bc41fd1..557e201ba 100644
--- a/modules/archive.module
+++ b/modules/archive.module
@@ -190,18 +190,6 @@ 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.')));
- }
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function archive_menu($may_cache) {
diff --git a/modules/archive/archive.module b/modules/archive/archive.module
index e4bc41fd1..557e201ba 100644
--- a/modules/archive/archive.module
+++ b/modules/archive/archive.module
@@ -190,18 +190,6 @@ 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.')));
- }
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function archive_menu($may_cache) {
diff --git a/modules/blog.module b/modules/blog.module
index 54adb2883..ca19a446f 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -256,10 +256,6 @@ function blog_view(&$node, $teaser = FALSE, $page = FALSE) {
function blog_link($type, $node = 0, $main) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('blogs'), 'blog', array('title' => t('Read the latest blog entries.')));
- }
-
if ($type == 'node' && $node->type == 'blog') {
if (arg(0) != 'blog' && arg(1) != $node->uid) {
$links[] = l(t("%username's blog", array('%username' => $node->name)), "blog/$node->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $node->name))));
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 54adb2883..ca19a446f 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -256,10 +256,6 @@ function blog_view(&$node, $teaser = FALSE, $page = FALSE) {
function blog_link($type, $node = 0, $main) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('blogs'), 'blog', array('title' => t('Read the latest blog entries.')));
- }
-
if ($type == 'node' && $node->type == 'blog') {
if (arg(0) != 'blog' && arg(1) != $node->uid) {
$links[] = l(t("%username's blog", array('%username' => $node->name)), "blog/$node->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $node->name))));
diff --git a/modules/book.module b/modules/book.module
index 18ca0f7de..a68f97248 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -59,10 +59,6 @@ function book_link($type, $node = 0, $main = 0) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('books'), 'book', array('title' => t('Read and contribute to the collaborative books.')));
- }
-
if ($type == 'node' && $node->type == 'book') {
if (!$main) {
if (book_access('create', $node)) {
@@ -82,6 +78,8 @@ function book_menu($may_cache) {
$items = array();
if ($may_cache) {
+ $items[] = array('path' => 'book', 'title' => t('books'),
+ 'access' => user_access('access content'), 'type' => MENU_NORMAL_ITEM, 'weight' => 5);
$items[] = array('path' => 'node/add/book', 'title' => t('book page'),
'access' => user_access('create book pages'));
$items[] = array('path' => 'admin/node/book', 'title' => t('books'),
diff --git a/modules/book/book.module b/modules/book/book.module
index 18ca0f7de..a68f97248 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -59,10 +59,6 @@ function book_link($type, $node = 0, $main = 0) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('books'), 'book', array('title' => t('Read and contribute to the collaborative books.')));
- }
-
if ($type == 'node' && $node->type == 'book') {
if (!$main) {
if (book_access('create', $node)) {
@@ -82,6 +78,8 @@ function book_menu($may_cache) {
$items = array();
if ($may_cache) {
+ $items[] = array('path' => 'book', 'title' => t('books'),
+ 'access' => user_access('access content'), 'type' => MENU_NORMAL_ITEM, 'weight' => 5);
$items[] = array('path' => 'node/add/book', 'title' => t('book page'),
'access' => user_access('create book pages'));
$items[] = array('path' => 'admin/node/book', 'title' => t('books'),
diff --git a/modules/forum.module b/modules/forum.module
index 1aa873ac3..39353f5ef 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -159,10 +159,6 @@ function forum_link($type, $node = 0, $main = 0) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('forums'), 'forum');
- }
-
if (!$main && $type == 'node' && $node->type == 'forum') {
// get previous and next topic
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 1aa873ac3..39353f5ef 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -159,10 +159,6 @@ function forum_link($type, $node = 0, $main = 0) {
$links = array();
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('forums'), 'forum');
- }
-
if (!$main && $type == 'node' && $node->type == 'forum') {
// get previous and next topic
diff --git a/modules/poll.module b/modules/poll.module
index f55cacabf..bb9505962 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -180,19 +180,6 @@ function poll_insert($node) {
}
/**
- * Implementation of hook_link().
- */
-function poll_link($type, $node = 0, $main) {
- $links = array();
-
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('polls'), 'poll', array('title' => t('View the list of polls on this site.')));
- }
-
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function poll_menu($may_cache) {
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f55cacabf..bb9505962 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -180,19 +180,6 @@ function poll_insert($node) {
}
/**
- * Implementation of hook_link().
- */
-function poll_link($type, $node = 0, $main) {
- $links = array();
-
- if ($type == 'page' && user_access('access content')) {
- $links[] = l(t('polls'), 'poll', array('title' => t('View the list of polls on this site.')));
- }
-
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function poll_menu($may_cache) {
diff --git a/modules/search.module b/modules/search.module
index 25f767bda..69714827d 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -68,19 +68,6 @@ function search_perm() {
}
/**
- * Implementation of hook_link().
- */
-function search_link($type) {
- $links = array();
-
- if ($type == 'page' && user_access('search content')) {
- $links[] = l(t('search'), 'search', array('title' => t('Search for older content.')));
- }
-
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function search_menu($may_cache) {
diff --git a/modules/search/search.module b/modules/search/search.module
index 25f767bda..69714827d 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -68,19 +68,6 @@ function search_perm() {
}
/**
- * Implementation of hook_link().
- */
-function search_link($type) {
- $links = array();
-
- if ($type == 'page' && user_access('search content')) {
- $links[] = l(t('search'), 'search', array('title' => t('Search for older content.')));
- }
-
- return $links;
-}
-
-/**
* Implementation of hook_menu().
*/
function search_menu($may_cache) {
diff --git a/modules/statistics.module b/modules/statistics.module
index 40791bc19..a9a59e263 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -137,14 +137,6 @@ function statistics_link($type, $node = 0, $main = 0) {
}
}
}
-
- if ($type == 'page' && user_access('access content')) {
- $userlink = variable_get('statistics_userpage_link', '');
- if ($userlink) {
- $links[] = l(t($userlink), 'statistics', array('title' => t("View this site's most popular content.")));
- }
- }
-
return $links;
}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 40791bc19..a9a59e263 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -137,14 +137,6 @@ function statistics_link($type, $node = 0, $main = 0) {
}
}
}
-
- if ($type == 'page' && user_access('access content')) {
- $userlink = variable_get('statistics_userpage_link', '');
- if ($userlink) {
- $links[] = l(t($userlink), 'statistics', array('title' => t("View this site's most popular content.")));
- }
- }
-
return $links;
}