Commit graph

2240 commits

Author SHA1 Message Date
Lukas Fleischer
1e5578b92d Merge branch 'maint' 2016-03-19 09:54:27 +01:00
Mark Weiman
2ef5f8a5ff 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 <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-18 23:30:48 +01:00
Lukas Fleischer
0108c64541 Resize the LastLoginIPAddress column
Make sure that all valid IPv6 addresses fit into the LastLoginIPAddress
field.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-15 18:01:15 +01:00
Lukas Fleischer
ff36b23153 Fix instructions for omitting "have" lines
In 002d348 (Describe how to omit "have" lines, 2015-11-14), we added
instructions on how to omit "have" lines originating from other package
repositories. Fix those instructions such that the HEAD ref of the
repository is transferred properly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-15 17:58:45 +01:00
Lukas Fleischer
27ad06e353 Release 4.2.1
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 13:52:57 +01:00
Lukas Fleischer
3ec3dfb6aa Merge branch 'maint' 2016-03-13 13:17:15 +01:00
Lukas Fleischer
32c8d0c3f8 Store last login address as plain text
Directly store the information contained in $_SERVER['REMOTE_ADDR']
instead of using ip2long() which does not support IPv6 addresses. Note
that the LastLoginIPAddress field is designed to be used by the
administrator on rare occasions only (e.g. to fight spam) and is not
displayed anywhere.

Fixes FS#48557.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 11:47:30 +01:00
Lukas Fleischer
761952d424 Fix l10n of "more"
Use __() instead of _() to make the string translatable.

Fixes FS#48529.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 09:14:57 +01:00
Ian D. Scott
2dfa72131b Remove code referencing non-existent and unused file
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 09:14:25 +01:00
Eric Engestrom
7b13203b81 Limit comment height to 15 lines
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-13 09:14:25 +01:00
Lukas Fleischer
95140b880b Merge branch 'maint' 2016-03-01 18:30:58 +01:00
Lukas Fleischer
42f5c405c0 aurjson: Remove stray GROUP BY clause
The IDs of packages are unique, so there is no need to group search
results by package ID.

Note that the GROUP BY statement in question was introduced in commit
3447dfc (Support versioned RPC queries, 2014-04-28) for no apparent
reason and could even lead to errors in various DBMS.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-01 18:30:48 +01:00
Lukas Fleischer
4c15f02ecb popupdate: Avoid NULL entries in the popularity field
The popularity field is declared as "NOT NULL" in the database schema.
Fix the popularity update query such that it uses a popularity of 0.0
instead of NULL for packages with no votes.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-03-01 18:27:23 +01:00
Lukas Fleischer
6ec4a3589e 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 <lfleischer@archlinux.org>
2016-02-21 20:01:13 +01:00
Mark Weiman
c23914fc1d Unset $pinned unconditionally when displaying comments
In pkg_comments.php, the $pinned variable is used to determine whether
the template is supposed to print all comments or pinned comments only.
If the $pinned variable is unset, the top 10 comments are printed,
followed by an "All comments" link. If the $pinned variable is set, the
pinned comments are printed and the "All comments" link below the
comment listing is skipped. Thus, we need to make sure that this
variable is always unset at the time we include the template to display
all comments, even if it was empty before.

Fixes FS#48194.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
fb56ec9d1e Hide orphan request option for disowned package bases
If a package base is unmaintained, there is no need to file an orphan
request. Hide the option from the front-end in this case.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
1626d4d2f7 notify: Fix notification of request initiator
Reimplement get_request_recipients() such that it always returns the
email addresses of the package base maintainer and the request
initiator, instead of the email address of the user triggering the
request status change.

Fixes FS#48238.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
443ccfab61 notify: Reintroduce Message-ID again
In commit 7b57e0e (Set Message-ID when sending package request emails,
2014-07-01), we changed the code responsible for sending notifications
such that the value of the Message-ID header is set deterministically in
the first email referring to a request. Unfortunately, this was
forgotten when porting the notification routines to Python in 9746a65
(Port notification routines to Python, 2015-06-27) and later fixed by
092e00f (notify: Fix references in request notifications, 2015-10-10).
However, when fixing another bug, the old behavior of not setting a
Message-ID was restored by d87b138 (notify: Fix merging of header dicts,
2015-10-26). Revert that particular change once more and add a comment
such that the line gets extra attention, should it be changed in the
future.

Fixes FS#48239.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-19 18:18:48 +01:00
Lukas Fleischer
d38a562b4d Release 4.2.0
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-15 08:18:55 +01:00
Lukas Fleischer
e2632ea6c9 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-15 08:17:23 +01:00
Lukas Fleischer
bf1b269483 Add an example post-checkout hook
Add a shell script to rebuild the documentation and install
translations. Can be executed manually or used as a post-checkout hook
in Git.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-11 19:19:29 +01:00
Lukas Fleischer
cd1756a4ed Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-09 21:58:48 +01:00
Lukas Fleischer
9d7d1be731 aurjson: Add package base keywords
Expose package base keywords through the RPC interface (version 5).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-09 21:54:39 +01:00
Lukas Fleischer
dc41a5afa5 git-serve: Change syntax for setting keywords
Instead of `config <pkgbase> keywords <keyword1> <keyword2>...`, the new
syntax is `set-keywords <pkgbase> <keyword1> <keyword2>...`.

The `config` keyword was rather general and it was not obvious that it
could be used to change package base settings. Instead of replacing it
with an even more verbose expression, remove that unnecessary level of
indirection. Since we do not (and probably never will) support keywords
anywhere else, the chance of name conflicts is small.

Suggested-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-09 21:03:47 +01:00
Lukas Fleischer
64072461df Add support for package update notifications
Introduce a new notification option to receive notifications when a new
commit is pushed to a package repository.

Implements FS#30109.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:54:20 +01:00
Lukas Fleischer
aa5e58db81 Add global comment notification setting
Add a configuration option to the account edit page that allows for
globally enabling/disabling package base comment notifications.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:52:05 +01:00
Lukas Fleischer
3412de21d3 Rename the CommentNotify table to PackageNotifications
As a preparatory step to adding support for package notifications on
events other than comments, rename the database table accordingly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:39:22 +01:00
Lukas Fleischer
daee000604 upgrading/4.2.0.txt: Fix numbering
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 10:05:23 +01:00
Johannes Löthberg
7a3a3876a8 git-update: Replace aurinfo.py with python-srcinfo
python-srcinfo is a more transparent and simpler library for parsing
SRCINFO files.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-07 09:48:32 +01:00
Lukas Fleischer
f8b3cb97e5 Fix issues reported by pyflakes
Fix several style issues and remove unneeded imports/assignments.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-06 16:23:01 +01:00
Lukas Fleischer
aaa138cd38 config.proto: Do not use the ssh+git scheme
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-02-06 16:12:33 +01:00
Marcel Korpel
1664a24198 Remove 'new' tag from updates table
It was hard to make it consistent with the other new icons from Open
Iconic and it hadn't much use after all.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:12:56 +01:00
Marcel Korpel
7d7fc18405 Make RSS icon dark gray and only blue on hover
The other new icons (in package comments) behave the same way.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:03:50 +01:00
Marcel Korpel
73364ad724 Correctly encode ampersand in query string within HTML attribute
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-31 20:03:49 +01:00
Marcel Korpel
6b766b8e77 Shorten maxlength of email input fields to 254 characters
After 24734d0 (Shorten Email column to 254 characters, 2015-11-12) the
maximum length of the input fields should be shortened, too.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-30 11:15:17 +01:00
Lukas Fleischer
6d6df72183 Update message catalog
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-28 23:04:00 +01:00
Lukas Fleischer
700df4f32f Include parentheses in translatable string
This string is easier to understand with the extra parentheses.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-28 23:00:08 +01:00
Marcel Korpel
2121982862 Rename constructors to __construct
In PHP 7, constructor methods that have the same name as the class
they are defined in are deprecated. Use __construct instead.
http://php.net/manual/en/migration70.deprecated.php

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-28 22:55:32 +01:00
Mark Weiman
b3a6809bad Fix duplicate ids from pinned comments
Fixed duplicate ids caused from pinned comments introduced in 7d4c0c9
(Implement capability to pin comments above others, 2015-12-12).

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-24 21:34:54 +01:00
Marcel Korpel
bd85441cf6 Add comment undeletion functionality
Only Developers and Trusted Users can undelete comments.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-01-23 11:50:03 +01:00
Mark Weiman
e9fe1a9eb1 Add link to flag OOD comment
Implements: FS#46546

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-15 17:46:18 +01:00
Mark Weiman
76a589257e Change FlaggerComment to TEXT
Makes FlaggerComments a TEXT field to be more consistent with package
comments.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-15 17:46:18 +01:00
Lukas Fleischer
4653945226 Hide names of deleted accounts in comment headings
When the account of a user who edited/deleted a comment is removed, drop
occurrences of his user name in comment headings instead of replacing
the user name with "None".

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 21:20:39 +01:00
Lukas Fleischer
51407d4a29 Store current date and time when deleting comments
Instead of modifying EditedTS when a comment is deleted, use a separate
field DelTS. Use this field to determine whether a comment has been
deleted, instead of checking DelUsersID which might be unset when the
corresponding user is deleted.

Fixes FS#47362.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 21:19:31 +01:00
Lukas Fleischer
9abd44671d Add a "more" link to the recent updates box
Implements FS#46924.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 18:28:06 +01:00
Lukas Fleischer
76aea988f6 cgitrc.proto: Add the aurweb favicon
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
9c98523494 Replace new package icon
Use a flat icon from the Open Iconic collection to mark new packages.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
a35dc4022a Replace RSS feed icon
Use a flat icon from the Open Iconic collection for the RSS feed.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
256a343b18 Remove old logos
Remove some very old and outdated logos. Update the RSS feed to use the
new logo.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00
Lukas Fleischer
ff798420b5 Add the Open Iconic license
The new SVG icons used in aurweb are taken from the Open Iconic project.
Add their license to our source tree.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-13 10:22:59 +01:00