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
a9260fa2
Commit
a9260fa2
authored
Oct 21, 2005
by
Steven Wittens
Browse files
-
#32603
: Clean up theme_pager_link (drumm)
parent
c0525a7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/pager.inc
View file @
a9260fa2
...
...
@@ -356,23 +356,19 @@ function theme_pager_list($limit, $element = 0, $quantity = 5, $text = '', $attr
* An HTML string that generates the link.
*/
function
theme_pager_link
(
$text
,
$page_new
,
$element
,
$attributes
=
array
())
{
$q
=
$_GET
[
'q'
];
$page
=
array_key_exists
(
'page'
,
$_GET
)
?
$_GET
[
'page'
]
:
''
;
$page
=
isset
(
$_GET
[
'page'
])
?
$_GET
[
'page'
]
:
''
;
if
(
$new_page
=
implode
(
','
,
pager_load_array
(
$page_new
[
$element
],
$element
,
explode
(
','
,
$page
))))
{
$attributes
[
'page'
]
=
$new_page
;
}
$query
=
array
();
foreach
(
$attributes
as
$key
=>
$value
)
{
$query
[]
=
$key
.
'='
.
$value
;
}
$page_new
=
pager_load_array
(
$page_new
[
$element
],
$element
,
explode
(
','
,
$page
));
if
(
count
(
$attributes
))
{
$url
=
url
(
$q
,
'page='
.
implode
(
','
,
$page_new
)
.
'&'
.
implode
(
'&'
,
$query
));
}
else
{
$url
=
url
(
$q
,
'page='
.
implode
(
','
,
$page_new
));
}
return
'<a href="'
.
check_url
(
$url
)
.
'">'
.
check_plain
(
$text
)
.
'</a>'
;
return
l
(
$text
,
$_GET
[
'q'
],
array
(),
count
(
$query
)
?
implode
(
'&'
,
$query
)
:
NULL
);
}
/**
* @} End of "Pager pieces".
*/
...
...
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