Commit graph

147 commits

Author SHA1 Message Date
Karlis Lauva
d38f3460e5 Added label tags for login form fields.
Lukas: Use tabs for indentation instead of spaces.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-05-09 10:54:36 +02:00
Lukas Fleischer
897211374f Use HTTPs for links in the main site navigation bar (fixes FS#23832).
Basically just sync with what archweb currently uses, prefixing all
relative URLs with "http://www.archlinux.org".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-20 00:13:10 +02:00
Lukas Fleischer
1e7b9d570d Use HTTPs for links in comment notification mails.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-19 23:58:32 +02:00
Lukas Fleischer
0e5f2e1f1e urlencode() query args for main site package search (fixes FS#23774).
There may be characters in package dependencies that are reserved within
URLs (e.g. "+"). Use urlencode() to ensure those are encoded correctly.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-19 23:45:43 +02:00
Lukas Fleischer
a5213daaec Make "Exact name" search option translatable.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-06 19:29:35 +02:00
Lukas Fleischer
1c55e6b40c Add option to search for exact name matches only (fixes FS#23556).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-06 19:21:19 +02:00
Dan McGee
2005a2889c Add more stats to the front page table
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:33 +02:00
Dan McGee
79ce38d271 Add indentation to stats table
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:32 +02:00
Dan McGee
7c91c59245 Remove Dummy Package concept
Instead, we just store dependencies directly in the PackageDepends
table. Since we don't use this info anywhere besides the package details
page, there is little value in precalculating what is in the AUR vs.
what is not.

An upgrade path is provided via several SQL statements in the UPGRADING
document. There should be no user-visible change from this, but the DB
schema gets a bit more sane and we no longer have loads of junk packages
in our tables that are never shown to the end user. This should also
help the MySQL query planner in several cases as we no longer have to be
careful to exclude dummy packages on every query.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:32 +02:00
Dan McGee
1f252eba64 Always set ModifiedTS including new packages
Set it equal to the SubmittedTS field, which will be our indication the
package is new when we show the logo on the front page of the AUR.

This results in the ability to remove the use of the unindexable
GREATEST() function from the AUR code everywhere we had to use it before
to handle the 0 timestamp case.

Note that there is no race condition here in calling UNIX_TIMESTAMP()
twice- it always returns the time at the beginning of statment
execution:

    mysql> select unix_timestamp(), sleep(2), unix_timestamp();
    +------------------+----------+------------------+
    | unix_timestamp() | sleep(2) | unix_timestamp() |
    +------------------+----------+------------------+
    |       1300851746 |        0 |       1300851746 |
    +------------------+----------+------------------+
    1 row in set (2.00 sec)

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-03 22:59:31 +02:00
Lukas Fleischer
0a625ae8ff Fix XSS vulnerability in "web/template/header.php".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-30 17:07:27 +02:00
Lukas Fleischer
3aa2240b7d Fix XSS vulnerabilities in package comment templates.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-30 10:49:51 +02:00
Dan McGee
b6a34d013b Bump up default per-page value to 50
25 is woefully small for the number of packages many searches can
return, and with 28000+ packages in AUR, it makes sense to show a lot
more per page by default.

The new choices of (50, 100, 250) happen to match those from the main
site.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-24 15:32:08 +01:00
Dan McGee
044393c44b Fix main site package search URL
I've been wanting to kill this one for a long time.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-15 15:46:10 +01:00
Lukas Fleischer
9b112a56d0 Fix XSS vulnerability in package search results and package details.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11 19:15:04 +01:00
Lukas Fleischer
7f9e498e48 Fix broken XHTML.
Fix a lot of invalid XHTML in the templates and actions. There might
still be some legacy code left, but this should cover most of it.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-11 19:00:50 +01:00
Dan McGee
80401c6afc More PHP Notice undefined fixups
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-10 18:15:59 +01:00
Dan McGee
171e297e5f Fix outdated link in My Statistics pane
Regression introduced in commit c39183c3ee.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:18 +01:00
Dan McGee
ddbe6d0d33 Remove dead dependency/required by link code
For some reason we were doing this song and dance "iterate all the known
parameters" business. This is totally unnecessary, clutters the links,
and was spewing errors all over the place, so kill it.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:17 +01:00
Dan McGee
3d5b735fae Fix PHP notices in pkg_search_form
If we were displaying this without coming from a previous query submit,
notices were emitted all over the place. Fix them by adding an isset()
first to each variable we try to access.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:16 +01:00
Dan McGee
f4fd7f7c9b Fix PHP notice: requiredby array
Required by query does not have a dep condition element.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:16 +01:00
Dan McGee
9b51f2d842 Fix main site URL
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:15 +01:00
Dan McGee
fcaee28818 Small template cleanup
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-03-04 10:29:13 +01:00
Lukas Fleischer
1e3fa38de5 Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-27 19:46:19 +01:00
Lukas Fleischer
c39183c3ee Add ability to search for non-out-of-date packages (fixes FS#17896).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-22 18:33:27 +01:00
PyroPeter
3d6c6cc98a Support for langauges written right-to-left
Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 13:52:38 +01:00
PyroPeter
346e82716b pkg_search_results: replace blind-table with floating divs
* I tried to remove errors in the sgml-structure
  e.g.: <div>
          <?php if (foo) { ?>
            </div>
          <?php } ?>
* I did not remove or add code (except the <table> and <div> stuff, of cause).
  I only changed the order of the html/php-tags.
* The bottom and top of the script are now properly indented.
  I did not indent the middle part (table of search results) because that would
  render the diff completely useless.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-18 13:52:35 +01:00
PyroPeter
1fdecbd5a4 pkg_search_results: rewrite of pagination
* Most of the PHP-code was moved to pkgfuncs.php to keep the template simple.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-17 18:54:26 +01:00
Lukas Fleischer
31083dc12d Show submitter in package details (fixes FS#15488).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-08 18:40:51 +01:00
Dan McGee
7f5af61c88 Drop PackageLocations table and references
We don't need this anymore since all packages managed here are
well...managed here. Rip out all of the places we were using this field,
many of which depended on the magic value '2' anyway.

On the display side of things, we had a column that was always showing
'unsupported' that is now gone, and you can no longer sort by this column.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-02-01 12:41:08 +01:00
Lukas Fleischer
2c098d73a2 Removed links to internal sources from package details.
Tarball extraction code has been removed in commit
ec0dfc27de, so links to package sources
contained in the source tarball itself will no longer be accessible
through the AUR frontend.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-25 10:07:34 +01:00
Lukas Fleischer
556de318ae Build URLs from package names (fixes FS#15308, FS#19327).
Drop the "URLPath" field from the "Packages" table, build URLs from
package names instead.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-24 18:08:29 +01:00
Lukas Fleischer
517ac744b2 Implemented "First" and "Last" link for search results (fixes FS#15690).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-20 20:45:09 +01:00
Lukas Fleischer
ec0dfc27de Removed code for tarball extraction.
Automatic tarball extraction was vulnerable in different ways. Users
should also only use source tarballs to build packages, so this has been
removed completely. From now on, only the PKGBUILD is extracted in a
secure manner.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-19 23:18:09 +01:00
Lukas Fleischer
233f67b87e Do not overwrite package details when adding comments (fixes FS#22075).
Ensure that the "$row" variable isn't overwritten in
"web/template/pkg_comment_form.php" during sending mail notifications
when adding a comment.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-19 21:18:47 +01:00
Lukas Fleischer
60edcd04e5 Make external links in comments clickable (FS#20137).
Comments are now split at link boundaries and links are converted
separately. I find this to be a much cleaner way than re-converting
comments that have already been converted using htmlspecialchars(). This
also doesn't require any callback procedure.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-01-19 21:18:45 +01:00
Dan Vratil
57a5cbfd88 Auto redirect from confirmation screens.
Finally move comment deletion and category editing into functions and
remove pkgedit.php

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
-Fix indentation
-Fix variable naming conflict $id vs $cid
2010-11-21 03:37:17 -05:00
Lukas Fleischer
eda713032c Add timestamp when a package is flagged out-of-date (FS#20848).
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
- resolve conflict and omit i18n changes.
2010-11-10 14:50:35 -05:00
Loui Chang
dbb8bb783f TU: Use htmlspecialchars instead of htmlentities.
Let the utf8 shine through.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-11-03 01:03:45 -04:00
Loui Chang
d13f2af079 Modify some strings for translation.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-10-07 23:07:01 -04:00
Manuel Tortosa
fa331f2cfe Fix columns headers visibility
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-10-03 03:50:07 -04:00
Loui Chang
cbf6349e6b pkg_search_form: Properly call translation function to translate strings.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-08-19 23:27:54 -04:00
PyroPeter
a4458e75bd Fix the search-button to allow captions wider than 80px (e.g. in german translation)
Change width to min-width. - Loui

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-08-11 20:00:31 -04:00
Loui Chang
137e7a1ad3 header.php: Add missing closing </li> tag.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-08-01 10:03:06 -04:00
Denis Kobozev
b22f66b3ee Header and navbar consistent with Arch site redesign
-- Loui Chang
Change is_tu to check_user_privileges
Change div#archdev-navbar style

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-23 05:40:15 -04:00
Lukas Fleischer
b5bc6ab742 Confirmation when deleting packages
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-07-01 21:19:18 -04:00
Loui Chang
91cf61fba5 Remove mystery code.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-05 02:07:23 -04:00
Lukas Fleischer
b18fb08ddc Add sorting by "Voted" and "Notify" fields
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-06-04 18:22:22 -04:00
Loui Chang
5b8b0757f4 pkg_comments: Only display 10 comments by default.
Add a mechanism to view all comments.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-04-15 16:52:55 -04:00
Andrea Scarpino
24599ab6e3 add search only by name
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2010-04-15 15:26:20 -04:00