diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index c4a1705a..2d06fc81 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -181,10 +181,19 @@ function username_from_sid($sid="") {
*
* @param string $username The user name to format
*
- * @return void
+ * @return string The generated HTML code for the account link
*/
function html_format_username($username) {
- return $username ? htmlspecialchars($username) : __("None");
+ $username_fmt = $username ? htmlspecialchars($username, ENT_QUOTES) : __("None");
+
+ if ($username && $_COOKIE["AURSID"]) {
+ $link = '' . $username_fmt . '';
+ return $link;
+ } else {
+ return $username_fmt;
+ }
}
/**
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index cc2f055c..7b75210a 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -289,33 +289,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))):
= __('Submitter') .': ' ?> |
-
- = html_format_username($submitter) ?> |
-
= html_format_username($submitter) ?> |
-
- = __('None') ?> |
-
= __('Maintainer') .': ' ?> |
-
- = html_format_username($maintainer) ?> |
-
= html_format_username($maintainer) ?> |
-
- = __('None') ?> |
-
= __('Last Packager') .': ' ?> |
-
- = html_format_username($packager) ?> |
-
= html_format_username($packager) ?> |
-
- = __('None') ?> |
-
= __('Votes') . ': ' ?> |
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index 2522f34d..2ceb35f0 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_details.php
@@ -148,33 +148,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))):
= __('Submitter') .': ' ?> |
-
- = html_format_username($submitter) ?> |
-
= html_format_username($submitter) ?> |
-
- = __('None') ?> |
-
= __('Maintainer') .': ' ?> |
-
- = html_format_username($maintainer) ?> |
-
= html_format_username($maintainer) ?> |
-
- = __('None') ?> |
-
= __('Last Packager') .': ' ?> |
-
- = html_format_username($packager) ?> |
-
= html_format_username($packager) ?> |
-
- = __('None') ?> |
-
= __('Votes') . ': ' ?> |
diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php
index f7b07bc0..5cff248c 100644
--- a/web/template/tu_last_votes_list.php
+++ b/web/template/tu_last_votes_list.php
@@ -21,7 +21,7 @@
?>
- = html_format_username($username) ?>
+ = html_format_username($username) ?>
|
= intval($row["LastVote"]) ?>
|