Commit graph

1681 commits

Author SHA1 Message Date
Lukas Fleischer
6ee1321211 Hide intermediate voting results
In order to make votes as neutral as possible, current yes/no votes
should not be shown until the voting period is over.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-03 21:53:21 +01:00
Lukas Fleischer
44ac24d394 tu_details.php: Fix unknown result check
Quorum is a decimal field, so checking "!$quorum" does not work. Use the
number of active TUs instead which is how we already check whether
participation information is available in other places.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-03 21:45:28 +01:00
canyonknight
42c9957e41 account_details.php: Add link to edit a user's account
This improves the ability to edit a user's account directly through
UI features rather than manually appending 'edit' to the URL or
searching for the account and selecting edit.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-03 21:16:36 +01:00
Lukas Fleischer
333ce08027 Sort last TU votes by vote and by user name
Instead of using a random secondary order, sort by the ID of the last
vote first, then by user name.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-02-01 17:38:58 +01:00
canyonknight
1e9d539acf Further optimize voters.php to only need the package name
* Extends changes in 81d4cc13dc
* Modify getvotes() to use the package name rather than package ID
* Rename getvotes() to votes_for_pkgname() for clarity with new changes
* Modify routing framework and links to now use package names for voters.php

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-22 18:27:42 +01:00
canyonknight
81d4cc13dc voters.php: Remove extra call to pkgname_from_id()
No need to store package ID and call pkgname_from_id() twice when
the end goal is the package name.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-20 15:41:19 +01:00
canyonknight
1bc78b9dff acctfuncs.inc.php: Allow translation of missing strings
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-20 15:41:17 +01:00
Lukas Fleischer
ecbb664b3d pkgsubmit.php: Improve visibility of errors
Make use of the "errorlist" class instead of "pkgoutput" which is no
longer defined in the CSS.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:36:01 +01:00
Lukas Fleischer
b7ea144dfb Add a warning for packages without .AURINFO
Display a deprecation warning when a package without meta data is
submitted. The user can still decide to ignore that warning by
resubmitting the package but doing so is not recommended.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:35:04 +01:00
Lukas Fleischer
ddbe1d1b1e Promote the use of mkaurball
mkaurball automatically adds .AURINFO meta data when building, so tell
people to use that instead of `makepkg --source`.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:35:04 +01:00
Lukas Fleischer
bfea8b29ad Detect split packages from .AURINFO
There is an extension to the .AURINFO format that supports split
packages. Since there is no support for split packages in the AUR so
far, add a check to identify these cases.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:35:04 +01:00
Lukas Fleischer
d428da4780 Strip whitespace from .AURINFO lines
Indentation can be useful if one wants to structure an .AURINFO file.
Remove leading and trailing whitespace from each line before parsing.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:35:04 +01:00
Lukas Fleischer
b0c55ae5c6 Rename "depend" field to "depends" in .AURINFO
This field has been renamed in a revision of the .AURINFO format.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-17 11:35:04 +01:00
Lukas Fleischer
7fa50acc72 Release 2.3.1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-13 19:55:53 +01:00
Lukas Fleischer
f2e26ebbf8 Fix split package error handling
Do not remove parentheses from the pkgname to make sure the split
package detection works properly.

Also, fix a regression introduced in 4bb6e88 (pkgsubmit.php: Simplify
package name validation, 2013-03-05) that resulted in the split package
error message never showing up.

Fixes FS#37496.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-11 13:36:10 +01:00
Balló György
d8ea2d4a02 Forbid developers to vote
According to Trusted User Bylaws, TUs (and only TUs) must take part in
votes. Developers who want to take part in votes should set their account
type to 'Trusted User'.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-11 12:08:51 +01:00
Lukas Fleischer
cc490ce8d6 passreset.php: Error out if e-mail is empty
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-11 12:08:24 +01:00
Lukas Fleischer
48b74071f0 passreset.php: Refactor HTML
* Use the "errorlist" class for errors.
* Refactor some code.
* Properly display error messages when requesting a key.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-11 12:08:24 +01:00
Joris Steyn
72e4d54178 Typeahead workaround for having to press enter twice
Currently, one has to press enter twice in order to submit the package
search form with typeahead completion. Add a workaround to fix this.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-11 12:04:33 +01:00
Joris Steyn
0d68494de7 Go to package when selecting a typeahead suggestion
Directly jump to the package details when selecting an entry from the
drop-down list.

Implements FS#34471.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-01-02 00:48:20 +01:00
canyonknight
dbf1d474f7 Convert adopt/disown package action link to form
* Changes adopting/disowning packages to use GET instead of POST
* Uses CSS to make form submit button look like a link
* Complements commit 3bc951e3d8

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-08 13:53:47 +02:00
Lukas Fleischer
77f1b264ca Sync CSS with archweb
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-03 13:14:39 +02:00
Lukas Fleischer
54ad28369a tu_list.php: Hide table if no results are found
Instead of showing a table with a single "No results found." entry, do
not show the table at all and display the text "No results found." in a
<p></p> container.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-03 12:58:54 +02:00
Lukas Fleischer
3130a887e8 Move "Add Proposal" link to "Current Votes"
The page this links to allows for adding an item to the list of current
votes. Move the link accordingly.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-03 12:53:58 +02:00
Lukas Fleischer
40fd73b668 Release 2.3.0
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-02 13:26:33 +02:00
Lukas Fleischer
f69facc9c9 Translation updates from Transifex
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-02 13:25:46 +02:00
Chris Down
35c5a5a3a9 Specify charset in Content-Type header when returning JSON data from API.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-09-02 00:29:58 +02:00
Lukas Fleischer
d225366f31 Add a registration time stamp to the "Users" table
This allows for easily detecting old accounts that registered and never
used the confirmation e-mail to set an initial password.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-28 16:37:56 +02:00
Lukas Fleischer
2276171b29 Only include current TUs in the last votes list
Do not show users that took part in past TU votes but no longer have TU
powers. Also, fix the sorting column while we're touching these lines.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-28 01:52:40 +02:00
Lukas Fleischer
c1c7f9b350 Move package comment check to packages.php
Checking whether to add a comment is something that really does not
belong to a function named display_package_details().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 11:35:26 +02:00
Lukas Fleischer
bf019a5b6c Use POST-Redirect-GET for most package actions
Avoid showing a POST data resubmission dialog and simply redirect to the
package page if a package action completed successfully.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 11:25:14 +02:00
Lukas Fleischer
23867a211c Add boolean return values to several pkg_*() functions
Change the return values of following functions to return both
error/success and an error/success message:

* pkg_flag()
* pkg_unflag()
* pkg_adopt()
* pkg_vote()
* pkg_delete()
* pkg_notify()
* pkg_delete_comment()
* pkg_change_category()

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 11:19:45 +02:00
Lukas Fleischer
86d2efaaa0 Exclude running votes from "Last Votes by TU"
Showing running votes potentially allows for tracking votes and
associating yes/no/abstain votes with specific TUs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 10:52:38 +02:00
Lukas Fleischer
7b0495cee2 Add a "fonts" package category
Implements FS#34666.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 02:46:55 +02:00
Lukas Fleischer
7c8e86010d Pick sane default registration language
Instead of defaulting to Català (which is the first entry in the list of
supported languages), choose whatever language the unregistered user is
browsing the AUR in.

Fixes FS#34825.

Suggested-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 02:42:19 +02:00
Lukas Fleischer
69b98efa35 Re-add CRSF tokens to most package actions
We fixed all known CRSF vulnerabilities in commit 2c93f0a (Implement
token system to fix CSRF vulnerabilities, 2012-06-23). c349cb2 (Add
virtual path support for package actions, 2012-07-17) partly reverted
this by injecting a valid CRSF token when virtual paths are in use.

This patch allows for keeping the virtual path feature, while
reintroducing POST forms and CRSF tokens. Actions like package flagging,
votes and notifications are no longer prone to CRSF (see FS#35437 for
details).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 02:27:19 +02:00
Lukas Fleischer
3bc951e3d8 pkg_details: Convert most action links to forms
Use forms and POST instead of GET for following actions:

* Flagging/Unflagging a package out-of-date
* Voting for a package and removing votes
* Enabling/Disabling notifications

Use CSS to make the submit buttons of these forms look like links.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-27 02:10:13 +02:00
Lukas Fleischer
be80aa0f01 Add Japanese and Slovak languages
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 18:45:10 +02:00
Lukas Fleischer
924da81e64 Update Transifex URL
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 18:37:24 +02:00
Lukas Fleischer
d7c8026781 Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 18:35:58 +02:00
Lukas Fleischer
431bf2f2f3 tu_details.php: Avoid division by zero
Do not divide by zero if the number of active TUs is unknown.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 18:02:37 +02:00
Lukas Fleischer
a4a170e58e Move "Past Votes" navigation to "Past Votes" box
These are navigation links and do not belong to the action box.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 17:53:24 +02:00
Lukas Fleischer
2dd3d04f45 Add "Last Votes by TU" list
This shows a list of all Trusted Users and the vote ID of the last
proposal each of the TUs voted on. This list is sorted by vote ID.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-26 17:34:31 +02:00
Lukas Fleischer
fb76aab8cf tu_details.php: Display vote result
This adds an field that indicates whether the vote was accepted or
rejected, based on the rules specified in the TU Bylaws.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:48:18 +02:00
Lukas Fleischer
481ff2335c tu_details.php: Avoid inline computations
Compute the total number of votes and the participation at the beginning
of the template instead of doing it inside the template itself.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:48:18 +02:00
Lukas Fleischer
d41e40d9d6 Add a vote type to the TU proposal form
There are only four valid reasons for starting a TU vote, so instead of
letting the user choose a vote length, let her pick a reason and set
vote length and quorum based on that selection.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:48:18 +02:00
Lukas Fleischer
64bfa6e828 Add a quorum column to TU_VoteInfo
This allows for specifying a quorum per vote and sets a basis for
implementing automated acceptance/rejection of TU votes later.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:48:16 +02:00
Lukas Fleischer
86fa42f399 Show participation in vote details
This is calculated by dividing the sum of all votes by the total number
of TUs (where the number of TUs is measured when the vote starts).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:47:53 +02:00
Lukas Fleischer
9ff082be25 Store the number of TUs when starting a vote
This will be used for automated calculation of vote participation later.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:47:51 +02:00
Lukas Fleischer
6844f6c1d2 Allow for setting an account's inactivity status
This adds a field to the users table and corresponding fields to the
account edit and display forms that allow for setting an (in-)activity
status.

This might turn out to be useful if a user is on vacation and can not
respond to update/orphan/deletion requests.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-08-22 17:43:13 +02:00