Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
24e76c0d
Commit
24e76c0d
authored
Jan 17, 2004
by
Dries
Browse files
- Code beautifications: corrected indentation.
parent
ebf57d17
Changes
2
Hide whitespace changes
Inline
Side-by-side
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