summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-19 07:15:35 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-07-19 07:15:35 +0000
commitc11c1c2800a91e1795ca75fb4206948015a976c3 (patch)
tree459a2c239615c61b1c5425617587a389b550e303 /modules
parent751a6979efe05d7d065cb7b3042ffcdb60182c8a (diff)
downloadbrdo-c11c1c2800a91e1795ca75fb4206948015a976c3.tar.gz
brdo-c11c1c2800a91e1795ca75fb4206948015a976c3.tar.bz2
#73605 by RobRoy, make hook_link() implementations consistent with documentation.
Diffstat (limited to 'modules')
-rw-r--r--modules/blog/blog.module2
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/comment/comment.module6
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/statistics/statistics.module2
-rw-r--r--modules/upload/upload.module4
6 files changed, 11 insertions, 11 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 13da3d34f..a2a0ccbff 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -244,7 +244,7 @@ function blog_view(&$node, $teaser = FALSE, $page = FALSE) {
/**
* Implementation of hook_link().
*/
-function blog_link($type, $node = 0, $main = 0) {
+function blog_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node' && $node->type == 'blog') {
diff --git a/modules/book/book.module b/modules/book/book.module
index a5384acd4..c83209be2 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -51,12 +51,12 @@ function book_access($op, $node) {
/**
* Implementation of hook_link().
*/
-function book_link($type, $node = 0, $main = 0) {
+function book_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node' && isset($node->parent)) {
- if (!$main) {
+ if (!$teaser) {
if (book_access('create', $node)) {
$links['book_add_child'] = array(
'title' => t('add child page'),
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 842a5fc10..9002ceb9b 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -183,12 +183,12 @@ function theme_comment_block() {
/**
* Implementation of hook_link().
*/
-function comment_link($type, $node = 0, $main = 0) {
+function comment_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node' && $node->comment) {
- if ($main) {
+ if ($teaser) {
// Main page: display the number of comments that have been posted.
if (user_access('access comments')) {
@@ -252,7 +252,7 @@ function comment_link($type, $node = 0, $main = 0) {
}
if ($type == 'comment') {
- $links = comment_links($node, $main);
+ $links = comment_links($node, $teaser);
}
return $links;
diff --git a/modules/node/node.module b/modules/node/node.module
index d2fe1775a..f47836660 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -801,7 +801,7 @@ function node_comment_mode($nid) {
/**
* Implementation of hook_link().
*/
-function node_link($type, $node = 0, $main = 0) {
+function node_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node') {
@@ -809,7 +809,7 @@ function node_link($type, $node = 0, $main = 0) {
$links = $node->links;
}
- if ($main == 1 && $node->teaser && $node->readmore) {
+ if ($teaser == 1 && $node->teaser && $node->readmore) {
$links['node_read_more'] = array(
'title' => t('read more'),
'href' => "node/$node->nid",
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 256d9c065..c7150d2d6 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -92,7 +92,7 @@ function statistics_perm() {
/**
* Implementation of hook_link().
*/
-function statistics_link($type, $node = 0, $main = 0) {
+function statistics_link($type, $node = NULL, $teaser = FALSE) {
global $id;
$links = array();
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index c05562953..a07ecbc26 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -41,11 +41,11 @@ function upload_perm() {
/**
* Implementation of hook_link().
*/
-function upload_link($type, $node = 0, $main = 0) {
+function upload_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
// Display a link with the number of attachments
- if ($main && $type == 'node' && isset($node->files) && user_access('view uploaded files')) {
+ if ($teaser && $type == 'node' && isset($node->files) && user_access('view uploaded files')) {
$num_files = 0;
foreach ($node->files as $file) {
if ($file->list) {