Commit graph

765 commits

Author SHA1 Message Date
Lukas Fleischer
eb6ae0c685 account.php: Always initialize $success
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-28 07:09:51 +01:00
Lukas Fleischer
f1d95c09a8 pkgflag.php: Remove stray variable
Drop the fragment part of the redirection code which is an artifact of
the original code copy-pasted in commit ca954fe (Do not redirect when
showing errors during flagging, 2015-10-21).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-27 18:20:00 +01:00
Lukas Fleischer
9ec1cfa192 404.php: Squelch warning on empty PATH_INFO
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-27 18:20:00 +01:00
Lukas Fleischer
29a48708bb Use bcrypt to hash passwords
Replace the default hash function used for storing passwords by
password_hash() which internally uses bcrypt. Legacy MD5 hashes are
still supported and are immediately converted to the new format when a
user logs in.

Since big parts of the authentication system needed to be rewritten in
this context, this patch also includes some simplification and
refactoring of all code related to password checking and resetting.

Fixes FS#52297.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-24 22:04:49 +01:00
Lukas Fleischer
5059056567 Fix several PHP short open tags
Use "<?=" instead of "<?" for printing.

Fixes a regression introduced in a9048bb (Dedupe translatable strings,
2015-11-25).

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 22:05:03 +01:00
Lukas Fleischer
e724b123ec pkgbase.php: Add default title
Instead of triggering a PHP warning and using an empty title if no
package base is specified, use a default title.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 22:01:34 +01:00
Lukas Fleischer
92049e8061 Hide old requests from the dashboard
Only show package requests created less than 6 months ago on the
dashboard.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-15 07:23:06 +01:00
Lukas Fleischer
3a167a109b Move package search links on the dashboard
Move the package search links below the section headings.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-12 12:42:47 +01:00
Lukas Fleischer
3ac5108db3 Move my packages to separate dashboard sections
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
2bc208c13e Add requests to dashboard
Add a new table which shows all package requests affecting the currently
logged in user.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
403241baa3 pkgreq_results.php: Add a flag to hide headers
Introduce a new boolean flag that can be used to disable extended
headers, pagination and forms.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
05007d8b1a pkgreq_results.php: Split out package results box
Do not include the wrapper div container in the template.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
d45585e36d Add flagged packages to the dashboard
Implement a table that shows all packages which are flagged out-of-date
and either maintained or co-maintained by the currently logged in user.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:27 +01:00
Lukas Fleischer
a1890d400b Add links to all owned packages to the dashboard
In addition to showing the 50 most recent maintained and co-maintained
packages, add links to all packages one owns or co-maintains.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-08 19:18:26 +01:00
Lukas Fleischer
1049f93191 Add dashboard
For logged in users, the home page is replaced with an overview of the
packages the user maintains or co-maintains.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 11:20:59 +01:00
Lukas Fleischer
b6aced9692 pkg_search_results.php: Split out package results box
Do not print the wrapper div container when calling pkg_search_page().

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 00:36:55 +01:00
Lukas Fleischer
3b4c6e72a9 Refactor pkg_search_page()
* Pass search parameters using an associative array instead of $_GET.
* Add a boolean parameter to enable and disable headers/footers.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-04 00:36:17 +01:00
Lukas Fleischer
ac745f656d Split out the search form from pkg_search_page()
This makes it easier to display search results without showing the
search form.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-02-03 23:54:31 +01:00
Mark Weiman
fc2ecff949 account.php: Reformat process_account_form() call
Modify the call to process_account_form() to only having one parameter per
line.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:51 +01:00
Mark Weiman
608c483090 Add user set timezones
Currently, aurweb displays all dates and times in UTC time. This patch
adds a capability for each logged in user to set their preferred
timezone.

Implements FS#48729.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-01-20 23:20:40 +01:00
Lukas Fleischer
e182ba0c42 Add clone hints to 404 error pages
When clicking on the linked Git clone URL of a package base, users are
faced with a 404 error page since the URL is not supposed to be opened
in a web browser. Add some notes to 404 error pages corresponding to Git
clone URLs that explain how to use them instead.

Fixes FS#51266.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-10-08 14:13:51 +02:00
Johannes Löthberg
a2a888625e Add missing database and account fields
Commits 6ec4a35 (Send notifications when changing ownership, 2016-02-21)
and e3670ef (Add a homepage field to accounts, 2016-06-02) forgot to
change some usages of display_account_form() and process_account_form()
to account for the new parameter. The former also forgot to add the new
column to the database schema.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-06-25 13:55:34 +02:00
Lukas Fleischer
e3670ef188 Add a homepage field to accounts
Allow users to add a link to their homepage to their profile.

Implements FS#22774.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2016-06-08 22:23:57 +02: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
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
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
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
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
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
Mark Weiman
7d4c0c9ffa Implement capability to pin comments above others
Adds capability to pin comments before others.

Implements FS#10863.

Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-12-12 15:09:47 +01:00
Lukas Fleischer
a9048bb07f Dedupe translatable strings
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-26 17:26:13 +01:00
Eli Schwartz
ecb746971c Change "File Request" to "Submit Request"
Apparently the reference to "files" can be confusing.

Fixes FS#47167.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-11-25 08:06:50 +01:00
Lukas Fleischer
d52b2f50b9 Support long email addresses
According to RFC 3696 (and the associated errata), an email address can
be up to 256 characters long. Change the database field and the length
limit on all input fields accordingly.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-25 10:57:46 +01:00
Lukas Fleischer
66d12f0c37 Highlight broken dependencies
If a dependency neither exists in the official repositories nor in the
AUR, make it appear bold red.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-24 18:59:04 +02:00
Lukas Fleischer
ca954fe95a Do not redirect when showing errors during flagging
Fixes FS#46545.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-22 07:17:38 +02:00
Lukas Fleischer
9c70e10aeb Check comment length in the backend
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-21 22:32:29 +02:00
Lukas Fleischer
9d8345d4e0 rpc.php: Display generated documentation
Instead of hardcoding the RPC interface documentation in rpc.php,
include the HTML code of the documentation page generated by AsciiDoc.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-04 11:40:38 +02:00
Lukas Fleischer
4fe513d838 Do not redirect to details page after deletion
When deleting a package base from the package base deletion form, do not
try to redirect to the package base details page afterwards. Instead,
jump to the package overview.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:57:44 +02:00
Lukas Fleischer
90e96e3728 Redirect to details pages after performing actions
After performing a package base action on a separate page, return to the
corresponding package base details page.

Partly fixes FS#46545.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:28:04 +02:00
Lukas Fleischer
d0f8b285e4 Fix a PHP "Undefined index" notice
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-10-03 11:15:53 +02:00
Marcel Korpel
df160b61e8 Make it more clear that the bug tracker is for aurweb only
Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-24 07:05:28 +02:00
Marcel Korpel
d5d08b8f92 Add option to hide one's email address
Implements FS#42343.

Signed-off-by: Marcel Korpel <marcel.korpel@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-20 22:01:23 +02:00
Lukas Fleischer
9cae17ff7c Extract package name from details
When requesting package details, instead of performing another SQL query
to obtain the package name, extract the name from the result of the
package details query.

Also, drop pkg_name_from_id() which is no longer needed after this
optimization.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2015-09-18 08:03:56 +02:00