summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/aur.inc.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 2d06fc8..a45c9b6 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -197,6 +197,31 @@ function html_format_username($username) {
}
/**
+ * Format the maintainer and co-maintainers for inclusion in HTML data
+ *
+ * @param string $maintainer The user name of the maintainer
+ * @param array $comaintainers The list of co-maintainer user names
+ *
+ * @return string The generated HTML code for the account links
+ */
+function html_format_maintainers($maintainer, $comaintainers) {
+ $code = html_format_username($maintainer);
+
+ if (count($comaintainers) > 0) {
+ $code .= ' (';
+ foreach ($comaintainers as $comaintainer) {
+ $code .= html_format_username($comaintainer);
+ if ($comaintainer !== end($comaintainers)) {
+ $code .= ', ';
+ }
+ }
+ $code .= ')';
+ }
+
+ return $code;
+}
+
+/**
* Determine the user's e-mail address in the database using a session ID
*
* @param string $sid User's session ID