Commit graph

1283 commits

Author SHA1 Message Date
Lukas Fleischer
c4b5584eef Sync CSS with archweb
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-20 18:28:17 +02:00
Lukas Fleischer
f0be65875b Display an error page if a virtual path doesn't exist
Give user feedback instead of bailing out with an empty HTTP response
body.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-20 18:28:17 +02:00
Lukas Fleischer
361e251bb1 pkg_search_results.php: Mark out-of-date packages
Highlight the version number of out-of-date packages on the package
search results page using the "flagged" class from archweb.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14 15:07:25 +02:00
Lukas Fleischer
360ce61f7a pkg_search_results.php: Move version to a separate column
Synchronize the column layout with archweb. This also allows for
easily highlighting the version number of out-of-date packages.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-14 15:07:22 +02:00
canyonknight
8ee6888f1d pkg_comments.php: Move delete button to same line as poster info
The delete button is currently on a separate line. Change some logic
to allow for the button to be on the same line as poster info.

Reported-by: Dave Reisner <d@falconindy.com>
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-11 21:20:01 +02:00
canyonknight
350c9a9579 pkg_comment_form.php: Remove redundant label for the comment box
Comment box already uses <h2> tag. Additional label is not needed.
Also remove label for form submit button.

Reported-by: Dave Reisner <d@falconindy.com>
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-11 21:19:20 +02:00
canyonknight
aef6fdfe17 pkgsubmit.php: Fix package version not updating
Parameters were not correct for a package update operation.
Fix regression of 763cbf8373

Fixes FS#31868

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-11 21:19:17 +02:00
canyonknight
f3325ce66f pkgfuncs.inc.php: Fix blacklisting functionality
An array that contains whether the package is blacklisted is
being improperly used for a comparison. Use fetchColumn() to
avoid the array completely and compare a value directly.

Regression with e171f6f34e

Fixes FS#31867

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-11 21:19:16 +02:00
canyonknight
24a8452880 Remove character limit on password length
As all new passwords are hashed and therefore stored in the database
at the same length, this limitation is no longer needed.

Fixes FS#31855

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-11 21:19:16 +02:00
canyonknight
e9a0272118 Change logo link for consistency with Archweb
Fixes FS#27669

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-10 17:22:23 +02:00
canyonknight
d94a9e7299 tu.php: Fix page showing a user hasn't voted when they have
An ended vote details page will report a user hasn't voted even when
they have. This is a result of faulty logic that only checks if a user
has voted if the vote is still running.

Regression with commit c15441762c6f6ab4438eaf2854c0ee3146a98b30

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-10 17:22:22 +02:00
Lukas Fleischer
14b237ac53 Refactor TU voters list
* Change voters_list() to return an array of voters instead of
  generating HTML code in the library call.

* Change the template to generate HTML code for the list of voters
  instead of displaying the library's return value.

* Use HTML lists.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-08 14:08:06 +02:00
Lukas Fleischer
eb7efe33ca pkg_search_results.php: Word-wrap package description
Implements FS#31803.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 19:51:59 +02:00
Lukas Fleischer
48ed8b772f Release 2.0.0-rc1
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 12:31:36 +02:00
Lukas Fleischer
18a2d14df6 UPGRADING: Add missing release note
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 12:27:52 +02:00
Lukas Fleischer
8938a94e84 Update message catalog
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 12:23:33 +02:00
Lukas Fleischer
7519028d12 Sync account details page with archweb
Synchronize the layout of the account details page with the developer
profiles page from archweb.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 02:02:08 +02:00
Lukas Fleischer
65cc6d3e2d Sync account editing page with archweb
Synchronize the layout of the account editing page with the profiles
page from archweb.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 02:02:08 +02:00
Lukas Fleischer
c28459fbb1 po/POTFILES: Add missing files
Add all source files in alphabetic order (`cd web; ls **/*.php`).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 02:02:08 +02:00
canyonknight
49864b9667 pkgfuncs.inc.php: Document all functions using PHPDoc format
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-04 01:47:00 +02:00
canyonknight
238695c402 pkgsubmit.php: Fix PHP notice for depends processing
A foreach() is run without verifying an uploaded package has any depends.
Fix the undefined index notice for packages uploaded with no depends.
Similar to commit 857de725d1.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-03 00:21:21 +02:00
Lukas Fleischer
e9ed60566e Do not notify if status is unchanged in pkg_flag()
Check if a package actually changed its status before sending an email
to prevent from spamming. Addresses FS#31745.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-03 00:21:21 +02:00
Lukas Fleischer
e2f3bee01e pkgfuncs.inc.php: Fix undefined variable notice
Fixes a undefined variable notice in getvotes() that popped up when a
package without any votes was requested.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-10-03 00:21:21 +02:00
canyonknight
9052aac127 pkg_details.php: Utilize account details virtual URL
When virtual URLs are enabled, simpler links can be used to access
a user's account details page. Change this for both the maintainer and
submitter links.

Keeps backwards compatibility with virtual URLs being disabled.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28 08:57:25 +02:00
canyonknight
fb093c0dd6 Deprecate actions bar when virtual URLs are used
The only buttons on the actions bar that were still used when virtual URLs
are enabled were the package deletion and package merging. These now reside
in separate pages, so remove the need for the actions bar when virtual URLs
are enabled.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28 08:57:25 +02:00
canyonknight
752c5a6e34 Move package merging to a separate page
Package actions now have a separate box on the package details page. Add
a package merge link in that box.

Link leads to a new page (pkgmerge.php) that can be used to confirm package
merging. A separate page with confirmation is used to avoid CSRFs.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28 08:57:25 +02:00
canyonknight
00cffd7ddb Move package deletion to a separate page
Package actions now have a separate box on the package details page. Make
a package deletion link in that box.

Link leads to a new page (pkgdel.php) that can be used to confirm package
deletion. A separate page with confirmation is used to avoid CSRFs.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-28 08:57:24 +02:00
Lukas Fleischer
d56a88897b Avoid use of "<b>"/"</b>"
* Use "<label>"/"</label>" for form labels.
* Use "<strong>"/"</strong>" for important text.
* Use "<h4>"/"</h4>" for headings.
* Drop "<b>"/"</b>" everywhere else.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 12:23:05 +02:00
Lukas Fleischer
6102759b7c Use echo shortcut syntax
Replace all occurrences of "<?php echo" and "<?php print" by "<?=" to
reduce noise in templates.

Note that as of PHP 5.4.0, "<?=" is always available and no longer
requires "short_open_tag" to be set.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 12:23:04 +02:00
canyonknight
964ea083e6 stats.inc.php: Document all functions using PHPDoc format
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 02:04:03 +02:00
canyonknight
6fa2f99e71 acctfuncs.inc.php: Document all functions using PHPDoc format
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 02:04:03 +02:00
canyonknight
bad31ada86 aur.inc.php: Document all functions using PHPDoc format
PHPDoc is a standardized format for commenting on PHP code.
Using it allows for a more cohesive use of IDEs and documentation
generators with the AUR code.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 02:04:02 +02:00
Lukas Fleischer
fa147bda8c UPGRADING: Fix database upgrade instructions
Oversight in commit 985795a210.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-24 02:04:02 +02:00
canyonknight
19df708551 rss.php: Update links to reflect URL changes
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-21 07:35:52 +02:00
canyonknight
2c7254eb60 Remove unused pkgnotify_from_sid function
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-20 10:58:29 +02:00
canyonknight
2d4dda7cc2 Remove unused canManagePackage() function
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-20 10:58:29 +02:00
canyonknight
a2f9eff861 Remove unused chmod_group() function
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-20 10:58:29 +02:00
Lukas Fleischer
4aad42d993 Sync search result statistics with archweb
* Use archweb classes for search result statistics.
* Add some space between page numbers.
* Display current page number instead of current item range.
* Hide page numbers if the result fits into a single page.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-19 02:42:01 +02:00
Lukas Fleischer
7c004693f7 Wrap long lines in the "Recent Updates" sidebar
* Sync the sidebar layout with archweb, use the "pkg-name" class to wrap
  long package names.

* Move the "New!" logo to a separate column to make sure it isn't
  wrapped to a new line on its own.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-19 01:17:32 +02:00
Lukas Fleischer
3b1dad229b Fix category selection
Add a package ID parameter to pkg_change_category() instead of relying
on the "ID" or "N" GET parameters.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 16:09:30 +02:00
Lukas Fleischer
c959d95fb1 Fix language selection
Use "REQUEST_URI" instead of the "PHP_SELF" sever variable to determine
the redirection URL for the language selection form. This fixes the
language selection feature to work well with virtual URLs.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 15:19:30 +02:00
Lukas Fleischer
96c36dc84f Fix package notification
One cannot check if the PDOStatement object returned by query()
evaluates to true in order to check for a non-empty record set. Modify
the SQL query to count the number of records instead of retrieving the
records themselves and fixing the check.

Regression introduced in e171f6f34e.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 15:14:34 +02:00
Lukas Fleischer
f37f0eaea1 pkg_details.php: Hide "Adopt" button from logged out users
Reported-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 14:33:48 +02:00
Lukas Fleischer
c318a50435 pkg_comments.php: Fix "Latest Comments" link
Avoid adding "?comments=all" more than once if the "Latest Comments"
link is clicked multiple times.

Reported-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 14:13:26 +02:00
Lukas Fleischer
2e552cbcad Do not set GET parameters in the routing framework
Setting GET parameters manually is bad style and causes some strange
side effects when using virtual URLs and mkurl().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 14:05:11 +02:00
Lukas Fleischer
20704e9053 pkgfuncs.inc.php: Add missing global keyword
Use the global keyword to import "$AUR_LOCATION" in
add_package_comment().

Regression introduced in d3de667901.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 14:01:58 +02:00
Lukas Fleischer
3d4cb66aed index.php: Fix undefined variable notice
Spotted when browsing the package details page while being logged out.

Reported-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 14:01:09 +02:00
canyonknight
0afe82f87c Make account registration work with recent account editing changes
The account editing form requires two different form action URLs
due to the fact that the same template is shared for both account
registration and account editing.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:59:59 +02:00
canyonknight
98ab6515b4 header.php: Update account editing link
* Use AUR_URL/account/userfoo/edit format for own account editing.
* Change "Accounts" label to "My Account" for regular users.
* Add ability for Developers and Trusted Users to edit their account
without having to use the search form first.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:59:48 +02:00
canyonknight
e84eb4ae54 Overhaul ability to edit own account
* Restructure account.php to remove redundant code.
* Remove own_account_details().
* Rework logic check to default to no access to account edit form.
* Make default account action viewing account info.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:59:45 +02:00