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
220
Merge Requests
220
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
24e76c0d
Commit
24e76c0d
authored
Jan 17, 2004
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Code beautifications: corrected indentation.
parent
ebf57d17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
86 deletions
+90
-86
modules/book.module
modules/book.module
+45
-43
modules/book/book.module
modules/book/book.module
+45
-43
No files found.
modules/book.module
View file @
24e76c0d
...
...
@@ -498,56 +498,58 @@ function book_show($node, $cid) {
function
book_navigation
(
$node
)
{
$path
=
book_location
(
$node
);
$path
=
book_location
(
$node
);
/*
** Construct the breadcrumb:
*/
/*
** Construct the breadcrumb:
*/
$node
->
breadcrumb
=
""
;
// Overwrite the trail with a book trail.
$node
->
breadcrumb
[]
=
l
(
t
(
"Home"
),
""
);
foreach
(
$path
as
$level
)
{
$node
->
breadcrumb
[]
=
l
(
$level
->
title
,
"book/view/
$level->nid
"
);
}
if
(
$node
->
nid
)
{
$output
.
=
"<div class=
\"
book
\"
>"
;
$node
->
breadcrumb
=
""
;
// Overwrite the trail with a book trail.
$node
->
breadcrumb
[]
=
l
(
t
(
"Home"
),
""
);
foreach
(
$path
as
$level
)
{
$node
->
breadcrumb
[]
=
l
(
$level
->
title
,
"book/view/
$level->nid
"
);
if
(
$tree
=
book_tree
(
$node
->
nid
))
{
$output
.
=
"<div class=
\"
tree
\"
>"
.
book_tree
(
$node
->
nid
)
.
"</div>"
;
}
if
(
$node
->
nid
)
{
$output
.
=
"<div class=
\"
book
\"
>"
;
if
(
$prev
=
book_prev
(
$node
))
{
$links
.
=
"<div class=
\"
prev
\"
>"
;
$links
.
=
l
(
t
(
"previous"
),
"book/view/
$prev->nid
"
,
array
(
"title"
=>
t
(
"View the previous page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
prev
\"
>
$prev->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
prev
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$next
=
book_next
(
$node
))
{
$links
.
=
"<div class=
\"
next
\"
>"
;
$links
.
=
l
(
t
(
"next"
),
"book/view/
$next->nid
"
,
array
(
"title"
=>
t
(
"View the next page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
next
\"
>
$next->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
next
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$node
->
parent
)
{
$links
.
=
"<div class=
\"
up
\"
>"
;
$links
.
=
l
(
t
(
"up"
),
"book/view/
$node->parent
"
,
array
(
"title"
=>
t
(
"View this page's parent section."
)));
$links
.
=
"</div>"
;
}
if
(
$tree
=
book_tree
(
$node
->
nid
))
{
$output
.
=
"<div class=
\"
tree
\"
>"
.
book_tree
(
$node
->
nid
)
.
"</div>"
;
}
$output
.
=
"<div class=
\"
nav
\"
>"
;
$output
.
=
" <div class=
\"
links
\"
>
$links
</div>"
;
$output
.
=
" <div class=
\"
titles
\"
>
$titles
</div>"
;
$output
.
=
"</div>"
;
$output
.
=
"</div>"
;
}
if
(
$prev
=
book_prev
(
$node
))
{
$links
.
=
"<div class=
\"
prev
\"
>"
;
$links
.
=
l
(
t
(
"previous"
),
"book/view/
$prev->nid
"
,
array
(
"title"
=>
t
(
"View the previous page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
prev
\"
>
$prev->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
prev
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$next
=
book_next
(
$node
))
{
$links
.
=
"<div class=
\"
next
\"
>"
;
$links
.
=
l
(
t
(
"next"
),
"book/view/
$next->nid
"
,
array
(
"title"
=>
t
(
"View the next page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
next
\"
>
$next->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
next
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$node
->
parent
)
{
$links
.
=
"<div class=
\"
up
\"
>"
;
$links
.
=
l
(
t
(
"up"
),
"book/view/
$node->parent
"
,
array
(
"title"
=>
t
(
"View this page's parent section."
)));
$links
.
=
"</div>"
;
}
$node
->
body
=
$node
->
body
.
$output
;
$output
.
=
"<div class=
\"
nav
\"
>"
;
$output
.
=
" <div class=
\"
links
\"
>
$links
</div>"
;
$output
.
=
" <div class=
\"
titles
\"
>
$titles
</div>"
;
$output
.
=
"</div>"
;
$output
.
=
"</div>"
;
}
$node
->
body
=
$node
->
body
.
$output
;
return
$node
;
}
...
...
modules/book/book.module
View file @
24e76c0d
...
...
@@ -498,56 +498,58 @@ function book_show($node, $cid) {
function
book_navigation
(
$node
)
{
$path
=
book_location
(
$node
);
$path
=
book_location
(
$node
);
/*
** Construct the breadcrumb:
*/
/*
** Construct the breadcrumb:
*/
$node
->
breadcrumb
=
""
;
// Overwrite the trail with a book trail.
$node
->
breadcrumb
[]
=
l
(
t
(
"Home"
),
""
);
foreach
(
$path
as
$level
)
{
$node
->
breadcrumb
[]
=
l
(
$level
->
title
,
"book/view/
$level->nid
"
);
}
if
(
$node
->
nid
)
{
$output
.
=
"<div class=
\"
book
\"
>"
;
$node
->
breadcrumb
=
""
;
// Overwrite the trail with a book trail.
$node
->
breadcrumb
[]
=
l
(
t
(
"Home"
),
""
);
foreach
(
$path
as
$level
)
{
$node
->
breadcrumb
[]
=
l
(
$level
->
title
,
"book/view/
$level->nid
"
);
if
(
$tree
=
book_tree
(
$node
->
nid
))
{
$output
.
=
"<div class=
\"
tree
\"
>"
.
book_tree
(
$node
->
nid
)
.
"</div>"
;
}
if
(
$node
->
nid
)
{
$output
.
=
"<div class=
\"
book
\"
>"
;
if
(
$prev
=
book_prev
(
$node
))
{
$links
.
=
"<div class=
\"
prev
\"
>"
;
$links
.
=
l
(
t
(
"previous"
),
"book/view/
$prev->nid
"
,
array
(
"title"
=>
t
(
"View the previous page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
prev
\"
>
$prev->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
prev
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$next
=
book_next
(
$node
))
{
$links
.
=
"<div class=
\"
next
\"
>"
;
$links
.
=
l
(
t
(
"next"
),
"book/view/
$next->nid
"
,
array
(
"title"
=>
t
(
"View the next page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
next
\"
>
$next->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
next
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$node
->
parent
)
{
$links
.
=
"<div class=
\"
up
\"
>"
;
$links
.
=
l
(
t
(
"up"
),
"book/view/
$node->parent
"
,
array
(
"title"
=>
t
(
"View this page's parent section."
)));
$links
.
=
"</div>"
;
}
if
(
$tree
=
book_tree
(
$node
->
nid
))
{
$output
.
=
"<div class=
\"
tree
\"
>"
.
book_tree
(
$node
->
nid
)
.
"</div>"
;
}
$output
.
=
"<div class=
\"
nav
\"
>"
;
$output
.
=
" <div class=
\"
links
\"
>
$links
</div>"
;
$output
.
=
" <div class=
\"
titles
\"
>
$titles
</div>"
;
$output
.
=
"</div>"
;
$output
.
=
"</div>"
;
}
if
(
$prev
=
book_prev
(
$node
))
{
$links
.
=
"<div class=
\"
prev
\"
>"
;
$links
.
=
l
(
t
(
"previous"
),
"book/view/
$prev->nid
"
,
array
(
"title"
=>
t
(
"View the previous page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
prev
\"
>
$prev->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
prev
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$next
=
book_next
(
$node
))
{
$links
.
=
"<div class=
\"
next
\"
>"
;
$links
.
=
l
(
t
(
"next"
),
"book/view/
$next->nid
"
,
array
(
"title"
=>
t
(
"View the next page."
)));
$links
.
=
"</div>"
;
$titles
.
=
"<div class=
\"
next
\"
>
$next->title
</div>"
;
}
else
{
$links
.
=
"<div class=
\"
next
\"
> </div>"
;
// make an empty div to fill the space
}
if
(
$node
->
parent
)
{
$links
.
=
"<div class=
\"
up
\"
>"
;
$links
.
=
l
(
t
(
"up"
),
"book/view/
$node->parent
"
,
array
(
"title"
=>
t
(
"View this page's parent section."
)));
$links
.
=
"</div>"
;
}
$node
->
body
=
$node
->
body
.
$output
;
$output
.
=
"<div class=
\"
nav
\"
>"
;
$output
.
=
" <div class=
\"
links
\"
>
$links
</div>"
;
$output
.
=
" <div class=
\"
titles
\"
>
$titles
</div>"
;
$output
.
=
"</div>"
;
$output
.
=
"</div>"
;
}
$node
->
body
=
$node
->
body
.
$output
;
return
$node
;
}
...
...
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