Commit graph

82 commits

Author SHA1 Message Date
Dan McGee
55da4d4e0d Don't hit the database twice per comment on package
It's performance improvement day today. For non-superusers, we were hitting
the database twice per comment on a package- once to get the UID, and once
to check the owner of the comment. The best part is we already knew the
owner of the comment, and we only need to get our own UID once.

For viewing a package like yaourt, this cuts a single pageview from over 700
queries to around 18, which is still not great but a pretty big improvement.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-13 10:07:46 -04:00
Loui Chang
9c98047f86 Fix search output if no results are found.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 13:22:53 -05:00
Loui Chang
2f8b8aac73 Redirect to REQUEST_URI after logging in.
This closes FS#13017

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 13:06:37 -05:00
Loui Chang
701186ad05 Fix user stats table links.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-02 13:38:54 -05:00
Andrea Scarpino
b1f83e8f58 added links at My Statistic values
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-02 13:25:22 -05:00
Loui Chang
24c9955b3c Revamp markup and styles for comments.
Make post date consistent with other dates.
Look Ma, no tables!

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18 23:01:25 -05:00
Loui Chang
75758801d8 XHTML Validation fixes.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18 09:42:39 -05:00
Andrea Scarpino
84f08cf82b Add 'Out of Date' detail in search form
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-18 09:31:20 -05:00
Loui Chang
e83e593ac4 Change layout of tu_details.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-13 15:31:05 -05:00
Angel 'angvp' Velasquez
df75621d23 List TUs that voted on a proposal.
This patch lists who voted on a proposal after the proposal is closed.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-13 15:27:05 -05:00
Loui Chang
fec2720a77 Fix Sources listing in package details.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-13 14:33:14 -05:00
Loui Chang
31ce2fc277 xhtml validation fix. 2009-02-09 00:14:51 -05:00
Loui Chang
8d16f647f9 Clean up some markup and styles in page navigation.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-06 18:24:04 -05:00
Callan Barrett
5702137e67 Change pagination style
Looks different now, next and previous on their own sides and elips for both

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-03 17:04:21 -05:00
Loui Chang
8137572ad3 Add support for filename::url syntax for sources.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-28 04:03:09 -05:00
Loui Chang
354c86b6c6 Move package comment form into a new template.
Feature the form on the package details page.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-25 13:17:54 -05:00
Loui Chang
8d31fb8a50 Indicate when there are more search result pages than numbered links show.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 13:10:16 -05:00
Loui Chang
54aca06d00 Validation fixes.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 01:31:04 -05:00
Loui Chang
b31b4ec03e Add package details template (pkg_details.php)
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 01:22:19 -05:00
Loui Chang
6bac561bf8 Rework login form.
Correct some xhtml validation errors.
Correct translation usage.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-24 00:40:30 -05:00
Loui Chang
ff3a29ea07 Move actions form into template.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 18:25:41 -05:00
Loui Chang
f82f3dd247 Fix a few xhtml validation errors.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 15:49:41 -05:00
Loui Chang
46da96ff04 Bring version footer in with the rest of the site body.
Add a bottom margin to pgbox blocks.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 15:05:46 -05:00
Loui Chang
03edceff50 Add Previous and Next links for search results.
Move things around at the bottom of the search results page.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 15:02:49 -05:00
Loui Chang
80a95443c5 Remove urlencode('K') in pkg_search_results.
The urlencoded string should only be used for href, but it was being
applied and used in printed output, like the keywords textbox.

This fixes a problem that was reported in
FS#12791 - Faster navigation withing package search listing by page numbers

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 10:38:13 -05:00
Loui Chang
22f19eeb66 Change comment style so long lines wrap.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-22 23:31:08 -05:00
Loui Chang
84cd2d0467 Fix translated comment messages.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-22 23:25:10 -05:00
Loui Chang
345fbfe99f Only print links for up to five previous and next search results pages.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-22 19:46:48 -05:00
Loui Chang
2ee3276348 Use new conglomerated translation files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 16:29:45 -05:00
Loui Chang
384f1ba3c9 Remove Less and More links from search results page.
Don't show extra search results link if there is only one page of results.
Fix indenting and coding style.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 15:28:10 -05:00
Gergely Imreh
2383f7dc06 Change: Switching "Legend" and number of results on search page
This is to present things in a bit more logical manner with the
search results page navigation.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 14:41:20 -05:00
Gergely Imreh
0bdfe847e3 Add: page numbering of AUR search results
On the search results page the number of pages is displayed and functions
as a link, for faster navigation (not just the usual "Less/More" buttons.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-19 14:39:21 -05:00
Loui Chang
844de1f25b Replace RSS icon with feed icon.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-14 22:09:26 -05:00
Dan McGee
5d6f465170 Cache all front page stats in APC if available
Use the APC cache to store all of the counts and the recently updated
package list in a cache, which cuts down on the number of database queries
needed. If the data isn't perfectly up to date we will survive.

This version of the patch will also cache the relevant counts for individual
logged-in users and is more careful about checking whether the value
actually exists in the cache by using the status reference to apc_fetch().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-08 11:48:58 -05:00
Loui Chang
07e4d397ba Change layout of search form.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-05 16:52:34 -05:00
Loui Chang
36b44f371b Move package comments to a template.
Change layout in the process.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-05 15:59:59 -05:00
Dan McGee
8f97330100 Store account type in local var when possible
No need to call this function way too often, especially when on the package
list page where it could be called up to once per row.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04 14:09:53 -05:00
Loui Chang
94bfae4f03 Properly select page length in search form.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:49:50 -05:00
Callan Barrett
a16f4c77b3 Make search page use mkurl function, change variables around
Changed all the normal variables to their $_GET counterparts so everything is destructively changing the original variables, there should be no issue with this. If there I guess we need to consider making mkurl use a custom array of variables rather than $_GET

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:33:19 -05:00
Callan Barrett
d62baaecf0 Add search bar to index and pkg details pages
Also changed it around a little bit so it's not tied down the search results function

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:31:55 -05:00
Callan Barrett
3288805d2d New search bar, toggle advanced options new style
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:30:12 -05:00
Loui Chang
aebf02aa8c Don't require login to see out of date packages from package search.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-22 22:02:01 +09:00
Loui Chang
22b50800e8 Make some translatable strings friendlier to common usage.
Removing trailing colons and whitespace makes them more usable.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-22 13:29:46 +09:00
Loui Chang
8f6edc4517 Encode search string for use in anchor tags.
Sorting, and viewing more results resets the search
if you search for '#' in 1.5.3. This should fix that bug.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-22 13:25:52 +09:00
Loui Chang
ae1c424c95 Really make all web paths relative.
I forgot about the forms.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-22 13:19:56 +09:00
Callan Barrett
b4a62c4915 Move package search results to a template
Logic is separated from html as much as possible, all html in a template

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-21 12:44:31 -05:00
Loui Chang
78c2b5c67f Introduce function include_lang for translations.
This includes only the requested language for each page and
makes top level language include files obsolete.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-21 18:03:27 +09:00
Loui Chang
cfeb080dcd Make all web paths relative.
The site no longer needs to be hosted from the
root of a domain, or virtual host.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-21 15:24:57 +09:00
Callan Barrett
a386ab5835 Revert "Move call to try_login to login_form."
This reverts commit 77d93c4946.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 12:49:28 -05:00
Loui Chang
77d93c4946 Move call to try_login to login_form.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-17 12:58:17 -05:00