Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
222
Merge Requests
222
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c11c1c28
Commit
c11c1c28
authored
Jul 19, 2006
by
drumm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#73605
by RobRoy, make hook_link() implementations consistent with documentation.
parent
751a6979
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
modules/blog/blog.module
modules/blog/blog.module
+1
-1
modules/book/book.module
modules/book/book.module
+2
-2
modules/comment/comment.module
modules/comment/comment.module
+3
-3
modules/node/node.module
modules/node/node.module
+2
-2
modules/statistics/statistics.module
modules/statistics/statistics.module
+1
-1
modules/upload/upload.module
modules/upload/upload.module
+2
-2
No files found.
modules/blog/blog.module
View file @
c11c1c28
...
...
@@ -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'
)
{
...
...
modules/book/book.module
View file @
c11c1c28
...
...
@@ -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'
),
...
...
modules/comment/comment.module
View file @
c11c1c28
...
...
@@ -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
;
...
...
modules/node/node.module
View file @
c11c1c28
...
...
@@ -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
"
,
...
...
modules/statistics/statistics.module
View file @
c11c1c28
...
...
@@ -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
();
...
...
modules/upload/upload.module
View file @
c11c1c28
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment