From 6ec4a3589e327ded693ab0c741828fc5ec66b840 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 21 Feb 2016 19:44:38 +0100 Subject: Send notifications when changing ownership Add a new option that makes it possible to subscribe to package ownership changes (adoption/disownment). Fixes FS#15412. Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 7 +++++-- web/lib/pkgbasefuncs.inc.php | 8 +++++++- web/template/account_edit_form.php | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index b39420fe..be0981f2 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -58,13 +58,14 @@ function html_format_pgp_fingerprint($fingerprint) { * @param string $J The inactivity status of the displayed user * @param string $CN Whether to notify of new comments * @param string $UN Whether to notify of package updates + * @param string $ON Whether to notify of ownership changes * @param string $UID The user ID of the displayed user * @param string $N The username as present in the database * * @return void */ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="", - $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") { + $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; include("account_edit_form.php"); @@ -92,13 +93,14 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="" * @param string $J The inactivity status of the user * @param string $CN Whether to notify of new comments * @param string $UN Whether to notify of package updates + * @param string $ON Whether to notify of ownership changes * @param string $UID The user ID of the modified account * @param string $N The username as present in the database * * @return array Boolean indicating success and message to be printed */ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="", - $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") { + $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") { global $SUPPORTED_LANGS; $error = ''; @@ -347,6 +349,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="" $q.= ", InactivityTS = " . $inactivity_ts; $q.= ", CommentNotify = " . ($CN ? "1" : "0"); $q.= ", UpdateNotify = " . ($UN ? "1" : "0"); + $q.= ", OwnershipNotify = " . ($ON ? "1" : "0"); $q.= " WHERE ID = ".intval($UID); $result = $dbh->exec($q); diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 1691bff7..5d10cce5 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -661,6 +661,9 @@ function pkgbase_adopt ($base_ids, $action=true, $via) { $q.= "SET MaintainerUID = $uid "; $q.= "WHERE ID IN (" . implode(",", $base_ids) . ") "; $dbh->exec($q); + + /* Add the new maintainer to the notification list. */ + pkgbase_notify($base_ids); } else { /* Update the co-maintainer list when disowning a package. */ if (has_credential(CRED_PKGBASE_DISOWN)) { @@ -692,8 +695,11 @@ function pkgbase_adopt ($base_ids, $action=true, $via) { } } + foreach ($base_ids as $base_id) { + notify(array($action ? 'adopt' : 'disown', $base_id, $uid)); + } + if ($action) { - pkgbase_notify($base_ids); return array(true, __("The selected packages have been adopted.")); } else { return array(true, __("The selected packages have been disowned.")); diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index b9affd64..b4f01926 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -143,6 +143,10 @@ />

+

+ + /> +

-- cgit v1.2.3-24-g4f1b From 7b13203b817084717a46e2f671e3cb533fdb1092 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 12 Mar 2016 14:50:03 +0000 Subject: Limit comment height to 15 lines Signed-off-by: Eric Engestrom Signed-off-by: Lukas Fleischer --- web/html/css/aurweb.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web') diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index f5e10371..f777ab83 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -148,3 +148,8 @@ label.confirmation, color: red; font-weight: bold; } + +#news div p { + max-height: 15em; + overflow: auto; +} -- cgit v1.2.3-24-g4f1b From 2dfa72131bfbc96584b78b597f86471874108a89 Mon Sep 17 00:00:00 2001 From: "Ian D. Scott" Date: Sat, 12 Mar 2016 13:49:46 -0800 Subject: Remove code referencing non-existent and unused file Signed-off-by: Lukas Fleischer --- web/html/index.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'web') diff --git a/web/html/index.php b/web/html/index.php index 3787d4e4..78ab6ad7 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -167,10 +167,6 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { header("Content-Type: image/gif"); readfile("./$path"); break; - case "/css/archnavbar/archlogo.gif": - header("Content-Type: image/png"); - readfile("./$path"); - break; case "/css/archnavbar/archlogo.png": case "/css/archnavbar/aurlogo.png": case "/images/favicon.ico": -- cgit v1.2.3-24-g4f1b From 2ef5f8a5ff23ee0b45a67f1d2ca3f646f09c2ff5 Mon Sep 17 00:00:00 2001 From: Mark Weiman Date: Thu, 17 Mar 2016 15:58:14 -0400 Subject: Change text of enable notifications link Since notifications are sent for more than just comments, change the notify link to more generic text. Signed-off-by: Mark Weiman Signed-off-by: Lukas Fleischer --- web/template/pkgbase_actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index 237e712f..d3f05921 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -24,7 +24,7 @@
  • -
  • +
  • -- cgit v1.2.3-24-g4f1b From e17e88a2e20531914cda220543c55d991b99721c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 23 May 2016 22:53:12 +0200 Subject: Add request type hints Add a text that explains when the currently selected request type should be used. Signed-off-by: Lukas Fleischer --- web/template/pkgreq_form.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/template/pkgreq_form.php b/web/template/pkgreq_form.php index 4fd7851d..639326eb 100644 --- a/web/template/pkgreq_form.php +++ b/web/template/pkgreq_form.php @@ -16,7 +16,7 @@

    - @@ -35,8 +35,16 @@ } } + function showHideRequestHints() { + $('#deletion_hint').hide(); + $('#merge_hint').hide(); + $('#orphan_hint').hide(); + $('#' + $('#id_type').val() + '_hint').show(); + } + $(document).ready(function() { showHideMergeSection(); + showHideRequestHints(); $('#id_merge_into').typeahead({ source: function(query, callback) { @@ -59,6 +67,15 @@

    +

    + +

    +

    + +

    +

    + +

    " />

    -- cgit v1.2.3-24-g4f1b From b757246e33a8cfcb5b8973d659a0b513d3b767d7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 2 Jun 2016 08:37:43 +0200 Subject: pkgbasefuncs.inc.php: Remove debug statement Remove a leftover var_dump() invocation that was introduced in commit 5fb7a74 (Replace categories with keywords, 2015-06-13). Signed-off-by: Lukas Fleischer --- web/lib/pkgbasefuncs.inc.php | 1 - 1 file changed, 1 deletion(-) (limited to 'web') diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 5d10cce5..b0827844 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -1062,7 +1062,6 @@ function pkgbase_set_keywords($base_id, $keywords) { $i = 0; foreach ($keywords as $keyword) { $q = sprintf("INSERT INTO PackageKeywords (PackageBaseID, Keyword) VALUES (%d, %s)", $base_id, $dbh->quote($keyword)); - var_dump($q); $dbh->exec($q); $i++; -- cgit v1.2.3-24-g4f1b From 333596ab4aca12bd9444196066f1511f07650f3f Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 8 Jun 2016 22:02:03 +0200 Subject: Update Arch Linux projects subdomain The projects.archlinux.org subdomain was moved to git.archlinux.org. Signed-off-by: Lukas Fleischer --- web/template/footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/template/footer.php b/web/template/footer.php index f5dc2d06..572dbb26 100644 --- a/web/template/footer.php +++ b/web/template/footer.php @@ -3,7 +3,7 @@