git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b10cdc2
)
common: silence warning in showlink about unused href
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 2 Jun 2022 21:53:27 +0000
(23:53 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 3 Jun 2022 22:53:43 +0000
(
00:53
+0200)
common.inc.plp
patch
|
blob
|
history
diff --git
a/common.inc.plp
b/common.inc.plp
index a1eb3e5e2a54ce24a0f7c9b110a6cdb5d5751b02..898e8bbcd5dd24774d6a32f166f14dae0def9fee 100644
(file)
--- a/
common.inc.plp
+++ b/
common.inc.plp
@@
-233,10
+233,9
@@
BEGIN {
sub showlink {
my ($title, $href, $selected) = @_;
- return sprintf(
- !$href ? '%s' :
- $selected ? '<strong>%s</strong>' : '<a href="%2$s">%s</a>',
- EscapeHTML($title), EscapeHTML($href)
- );
+ EscapeHTML($title);
+ return $title if not $href;
+ return "<strong>$title</strong>" if $selected;
+ return sprintf '<a href="%s">%s</a>', EscapeHTML($href), $title;
}