This adds a get function for print_sort_th so that the basic
function can be used outside of their straight printing operation.
---
gitweb/gitweb.perl | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d38aad6..07fdeb5 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4375,17 +4375,24 @@ sub fill_project_list_info {
# print 'sort by' <th> element, generating 'sort by $name' replay link
# if that order is not selected
sub print_sort_th {
+ print get_sort_th(@_);
+}
+
+sub get_sort_th {
my ($name, $order, $header) = @_;
+ my $sortth = "";
$header ||= ucfirst($name);
if ($order eq $name) {
- print "<th>$header</th>\n";
+ $sortth .= "<th>$header</th>\n";
} else {
- print "<th>" .
+ $sortth .= "<th>" .
$cgi->a({-href => href(-replay=>1, order=>$name),
-class => "header"}, $header) .
"</th>\n";
}
+
+ return $sortth;
}
sub git_project_list_body {--
1.6.5.2