From 4726c93156e59e0b44faf55845c3f97cf00a9168 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 24 Nov 2004 22:56:21 +0000 Subject: [PATCH] - 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. --- modules/aggregator.module | 9 --------- modules/aggregator/aggregator.module | 9 --------- modules/archive.module | 12 ------------ modules/archive/archive.module | 12 ------------ modules/blog.module | 4 ---- modules/blog/blog.module | 4 ---- modules/book.module | 6 ++---- modules/book/book.module | 6 ++---- modules/forum.module | 4 ---- modules/forum/forum.module | 4 ---- modules/poll.module | 13 ------------- modules/poll/poll.module | 13 ------------- modules/search.module | 13 ------------- modules/search/search.module | 13 ------------- modules/statistics.module | 8 -------- modules/statistics/statistics.module | 8 -------- 16 files changed, 4 insertions(+), 134 deletions(-) diff --git a/modules/aggregator.module b/modules/aggregator.module index b578bb79fbb..b9436b975d6 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -107,15 +107,6 @@ 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.')))); - } -} - /** * Implementation of hook_menu(). */ diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index b578bb79fbb..b9436b975d6 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -107,15 +107,6 @@ 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.')))); - } -} - /** * Implementation of hook_menu(). */ diff --git a/modules/archive.module b/modules/archive.module index e4bc41fd1be..557e201ba61 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -189,18 +189,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(). */ diff --git a/modules/archive/archive.module b/modules/archive/archive.module index e4bc41fd1be..557e201ba61 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -189,18 +189,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(). */ diff --git a/modules/blog.module b/modules/blog.module index 54adb288328..ca19a446f65 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 54adb288328..ca19a446f65 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 18ca0f7defb..a68f9724834 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 18ca0f7defb..a68f9724834 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 1aa873ac3dd..39353f5ef87 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 1aa873ac3dd..39353f5ef87 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 f55cacabfbd..bb950596201 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -179,19 +179,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(). */ diff --git a/modules/poll/poll.module b/modules/poll/poll.module index f55cacabfbd..bb950596201 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -179,19 +179,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(). */ diff --git a/modules/search.module b/modules/search.module index 25f767bda37..69714827d15 100644 --- a/modules/search.module +++ b/modules/search.module @@ -67,19 +67,6 @@ function search_perm() { return array('search content', 'administer search'); } -/** - * 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(). */ diff --git a/modules/search/search.module b/modules/search/search.module index 25f767bda37..69714827d15 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -67,19 +67,6 @@ function search_perm() { return array('search content', 'administer search'); } -/** - * 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(). */ diff --git a/modules/statistics.module b/modules/statistics.module index 40791bc1995..a9a59e2632a 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 40791bc1995..a9a59e2632a 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; }