Commit graph

741 commits

Author SHA1 Message Date
elij
325347a268 Add maintainer search to json interface. Closes FS#15947
Fix for maintainer search ticket: FS#15947
Also http://mailman.archlinux.org/pipermail/aur-dev/2009-September/000892.html

Fixed some problems with selecting the proper data fields in the
original patch. - Loui

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 15:44:31 -04:00
elij
a6d5cb71a6 fix content-type when sending jsonp
jsonp callback should have a content type of text/javascipt,
since it specifies a callback function wrapping json data,
and is not soley json data.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 15:17:07 -04:00
Gergely Imreh
4d1eb4dd7a Fix: FS#15526 non-UTF8 character in rpc output
Currently AUR does not check the uploaded packages, whether they are
correctly in UTF8 encoding. If there are fields (such as $pkgdesc)
that contain such non-UTF8 characters, the rpc interface chokes on
those fields: even if there's data successfully retrieved from the
database, rpc returns "null".
In an effort to make such errors in the PKGBUILDs debugged more easily,
let's force rpc to have more useful output: try to convert non-UTF8
fields to UTF8. If it's a success, good. Partial success (some characters
showing as \uXXXX) is ok. Failure results in error message printed to that
field.

Signed-off-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-16 07:50:44 -04:00
Loui Chang
1bf54a32c4 aurjson: Use call_user_func to call functions.
call_user_func_array is unnecessary.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-14 17:03:50 -04:00
Laszlo Papp
56990b3748 Initial Hungarian Translation
Signed-off-by: Laszlo Papp <djszapi2@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-26 20:02:30 -04:00
Sergej Pupykin
3fd08d5715 remove community
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-26 00:14:32 -04:00
Dan McGee
46f2798524 Use include_once where applicable
All of these are sourcing function libraries so we don't need to include
them more than once. Things that insert actual HTML into the output were
left calling include().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:12 -04:00
Loui Chang
cebf4f006e Add Romanian to config.inc.proto and AUTHORS.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-02 17:39:04 -04:00
Loui Chang
9f854efe86 Bump version to 1.5.6.4
I forgot to bump the version again!

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:12:50 -04:00
Loui Chang
610733eafd Remove excess whitespace.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:05:44 -04:00
Dan McGee
1ceeda8ab5 Specify explicit joins for package search
Refactor the query to use explicit LEFT JOINs, which appears to be handled
by MySQL in a saner fashion than the previous implicit join syntax. This is
part two in a slight fixup for observed slow queries in the production
environment. With the new indexes and this fixup, a particular iteration of
this query will examine only 13346 rows instead of 272060.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-18 01:47:17 -04:00
Loui Chang
135d610957 Add Ukranian translation to default config.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-13 10:27:10 -04:00
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
f028d5c140 translator.inc: Eliminate notices for untranslated strings.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-13 09:55:04 -04:00
Loui Chang
4d697dc42b Move cn.po to zh_CN.po.
Update AUTHORS, and config.inc.proto

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-13 09:45:28 -04:00
Loui Chang
ec214fdb42 Remove author information from scripts.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-12 23:02:08 -04:00
Loui Chang
a9a4d31e14 Bump version to 1.5.6.2
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-04-06 11:53:33 -04:00
Loui Chang
d57b28ac7e Add LocationID to returned fields in json interface.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 22:28:48 -05: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
3c1b84bc7e Go to details page when a search returns one result.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 12:55:14 -05:00
Loui Chang
c949296a08 pkgfuncs.inc: Fix indentation.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 12:11:49 -05:00
Loui Chang
bbc05414cf Update cleanup script to remove non-unsupported files.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-03-03 11:21:08 -05:00
Loui Chang
402c6d0933 Fix the comment poop bug.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-20 20:59:07 -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
Dan McGee
0caa949e41 rpc: delay getting DB connection until absolutely necessary
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-15 14:30:35 -05:00
Loui Chang
9afe1eee46 Bump version to 1.5.6
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-02-01 19:52:26 -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
Dan McGee
9cf7f1a4a2 APC work follow-up
I managed to send an outdated patch to the mailing list that got applied, so
some of these changes never made it in. A little more cleanup and a little
more caching, and also increase the default time to 600 seconds (10
minutes).

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-25 11:41:30 -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
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
1e9147a352 Return CategoryID from the json interface.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 13:41:38 -05:00
Loui Chang
1fbaee1a0e Bump version to 1.5.5.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-23 00:37:02 -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
2da9b55d9f Fix stats functionality when APC is unavailable.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-08 13:08:58 -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
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
207b565f1c Minimize calls to uid_from_sid()
Just like the previous patch for account_from_sid() over-usage.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-01-04 14:28:24 -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
Dan McGee
bf4fe7f47c aur.inc: remove unused code
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-31 10:14:12 -05:00
Loui Chang
1529020e79 Get db connection for accounts search results.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-31 10:09:04 -05:00
Dan McGee
3b4662a58e Use non-persistant connections
There is really no need to use persistent connections to the database in
this day and age. Most PHP development guides recommend against it, and the
new mysqli interface doesn't even include the functionality.

Add a matching but currently unused db_disconnect() function while we are at
it. Reference counting will cover us for the most part, however.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-30 13:00:53 -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
520d1e2a35 Add function to generate clean urls
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-29 17:29:53 -05:00
Callan Barrett
d4b80de492 Bump to version 1.5.4
Quick release to fix the chmod issue. GO TEAM!!

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
2008-12-25 01:17:14 +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
Callan Barrett
6415b65ac9 Fix up valid email function, FS#12269
All we're looking for now is an @ in any email address to fix problem with not being able to have + in addresses and just because I see no advantage to having any sort of stringent validation

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-21 12:42:26 -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
e12a8ad3da Remove success messages after package functions
Just displays message at the top of the page of what happened (errors or not) and goes back to the same page

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2008-12-20 18:33:45 -05:00