Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
37148276
Commit
37148276
authored
Jan 19, 2004
by
Dries Buytaert
Browse files
- Fixed bug 5247: active link marking invalidates HTML. Patch by Goba.
parent
b5ac4684
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
37148276
...
...
@@ -1037,7 +1037,15 @@ function drupal_attributes($attributes = NULL) {
}
function
l
(
$text
,
$url
,
$attributes
=
array
(),
$query
=
NULL
,
$fragment
=
NULL
)
{
return
"<a href=
\"
"
.
url
(
$url
,
$query
,
$fragment
)
.
"
\"
"
.
(
$url
==
$_GET
[
'q'
]
?
' class="active"'
:
NULL
)
.
drupal_attributes
(
$attributes
)
.
">
$text
</a>"
;
if
(
$url
==
$_GET
[
'q'
])
{
if
(
isset
(
$attributes
[
'class'
]))
{
$attributes
[
'class'
]
.
=
' active'
;
}
else
{
$attributes
[
'class'
]
=
'active'
;
}
}
return
"<a href=
\"
"
.
url
(
$url
,
$query
,
$fragment
)
.
"
\"
"
.
drupal_attributes
(
$attributes
)
.
">
$text
</a>"
;
}
function
field_get
(
$string
,
$name
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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