[aur-dev] AUR Variable Names

Loui louipc.ist at gmail.com
Sat Jan 5 12:16:33 EST 2008

First of all look at how many of those variables are empty. Make the
code not put empty variables into the URL and make the code that gets
the variables deal with unset/empty variables. I was working on this
at some point.

1. On the search page you could use a function for processing
variables when sorting results in various ways (eg. by name,
maintainer, repo, etc) There's a lot of repeated code there... I'm not
sure if I committed any change there

2. For details page I was thinking of storing search parameters into a
cookie so you could still go back to the search page to resume looking
at previous search results.

3. Separate package search code from package details code. (If it
hasn't already been done) $do_Details doesn't actually mean anything.
I could set do_Details=gramma and it'll still show me the pkg details,
the only requirement seems to be that it is set. so make packages.php
only show details and get rid of that variable. It won't hurt existing
URL links if you get rid of it either.
Make another page like search_packages.php for searching packages.

You might want to bug people to get those previous patches applied
before getting too ahead hehe.


On Jan 5, 2008 9:05 AM, Callan Barrett <wizzomafizzo at gmail.com> wrote:
> I'd like some suggestions on how we deal with the issue of this:
> http://aur.archlinux.org/packages.php?do_Details=1&ID=6978&O=0&L=&C=&K=&SB=&SO=&PP=&do_MyPackages=&do_Orphans=&SeB=
> I've seen suggestions of mod_rewrite but really nothing further, I'll
> start us off but I really want opinions from at least a few different
> people. To begin I'm not really thrilled with the idea of mod_rewrite
> at all and I can't find much of a point to using it, I've been told it
> will be amazing because then we can have urls like /search/foo/ but so
> what? People don't search using urls they search with the search form
> and the fact we can start going /package/1337/ instead of say
> packages.php?id=1337 is so incredibly minor why should we bother?
> I propose that at the very least (that is even if we decide to use
> mod_rewrite for some crazy reason) we change the variable names to
> something that's actually descriptive and try get rid of as many
> variables as possible. If you take a look at tardo's repo you can see
> the details page now only requires the package id variable and nothing
> else which is a great step in the right direction, we can also get rid
> of the sorting options in the search form because you can already sort
> via the links in column names and the variables do_Search is just as
> pointless as do_Details. With just these changes we get something like
> O=0&L=&C=&K=&PP=&SeB= which we could probably make even smaller and
> nicer if we changed variable names to be descriptive.
> Anyway, most of all I want to hear what other people have to say about
> this because I think choosing the right names and issues like
> backwards compatibility are pretty important.
> --
> Callan 'wizzomafizzo' Barrett

More information about the aur-dev mailing list