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 b39420f..be0981f 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 1691bff..5d10cce 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 b9affd6..b4f0192 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -143,6 +143,10 @@ />

+

+ + /> +

-- cgit v1.2.3-54-g00ecf 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 f5e1037..f777ab8 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-54-g00ecf 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 3787d4e..78ab6ad 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-54-g00ecf 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 237e712..d3f0592 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -24,7 +24,7 @@
  • -
  • +
  • -- cgit v1.2.3-54-g00ecf 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 4fd7851..639326e 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-54-g00ecf 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 5d10cce..b082784 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-54-g00ecf 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 --- INSTALL | 2 +- README | 2 +- doc/i18n.txt | 2 +- web/template/footer.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'web') diff --git a/INSTALL b/INSTALL index 8b0cd29..dab48cc 100644 --- a/INSTALL +++ b/INSTALL @@ -4,7 +4,7 @@ Setup on Arch Linux 1) Clone the AUR project: $ cd /srv/http/ - $ git clone git://projects.archlinux.org/aurweb.git + $ git clone git://git.archlinux.org/aurweb.git 2) Setup a web server with PHP and MySQL. Configure the web server to redirect all URLs to /index.php/foo/bar/. The following block can be used with nginx: diff --git a/README b/README index 71e8481..1988186 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ web:: Links ----- -* The repository is hosted at git://projects.archlinux.org/aurweb.git -- see +* The repository is hosted at git://git.archlinux.org/aurweb.git -- see doc/CodingGuidelines for information on submitting patches. * Discovered bugs can be submitted to the aurweb bug tracker: diff --git a/doc/i18n.txt b/doc/i18n.txt index d5b6764..a1c21fe 100644 --- a/doc/i18n.txt +++ b/doc/i18n.txt @@ -21,7 +21,7 @@ strings for the translation to be usable, and it may have to be disabled. 1. Check out the aurweb source using git: -$ git clone git://projects.archlinux.org/aurweb.git aurweb-git +$ git clone git://git.archlinux.org/aurweb.git aurweb-git 2. Go into the "po/" directory in the aurweb source and run msginit(1) to create a initial translation file from our translation catalog: diff --git a/web/template/footer.php b/web/template/footer.php index f5dc2d0..572dbb2 100644 --- a/web/template/footer.php +++ b/web/template/footer.php @@ -3,7 +3,7 @@