<feed xmlns='http://www.w3.org/2005/Atom'>
<title>markzz/aurweb.git/web/lib/aurjson.class.php, branch v1.9.1</title>
<subtitle>aurweb working repository</subtitle>
<id>https://git.markzz.net/markzz/aurweb.git/atom/web/lib/aurjson.class.php?h=v1.9.1</id>
<link rel='self' href='https://git.markzz.net/markzz/aurweb.git/atom/web/lib/aurjson.class.php?h=v1.9.1'/>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/'/>
<updated>2011-10-25T07:25:43Z</updated>
<entry>
<title>Escape wildcards in "LIKE" patterns</title>
<updated>2011-10-25T07:25:43Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-10-20T06:43:44Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=e53b91fe52be262d94a45769814c1e87c796988b'/>
<id>urn:sha1:e53b91fe52be262d94a45769814c1e87c796988b</id>
<content type='text'>
Percent signs ("%") and underscores ("_") are not escaped by
mysql_real_escape_string() and are interpreted as wildcards if combined
with "LIKE". Write a wrapper function db_escape_like() and use it where
appropriate.

Note that we already fixed this for the RPC interface in commit
da2ebb667b7a332ddd8d905bf9b9a8694765fed6 but missed the other places.
This patch should fix all remaining flaws reported in FS#26527.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
Signed-off-by: Dan McGee &lt;dan@archlinux.org&gt;
</content>
</entry>
<entry>
<title>Wrap mysql_real_escape_string() in a function</title>
<updated>2011-10-25T07:25:30Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-10-20T06:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=10b6a8fff7e6d407421c74889455b969be7f867f'/>
<id>urn:sha1:10b6a8fff7e6d407421c74889455b969be7f867f</id>
<content type='text'>
Wrap mysql_real_escape_string() in a wrapper function db_escape_string()
to ease porting to other databases, and as another step to pulling more
of the database code into a central location.

This is a rebased version of a patch by elij submitted about half a year
ago.

Thanks-to: elij &lt;elij.mx@gmail.com&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;

Conflicts:

	web/lib/aur.inc.php
</content>
</entry>
<entry>
<title>RPC: Fix info queries when using package IDs</title>
<updated>2011-08-22T06:17:26Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-08-22T06:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=53a31865f41db7315dc5c99e1b100f397ef80b1a'/>
<id>urn:sha1:53a31865f41db7315dc5c99e1b100f397ef80b1a</id>
<content type='text'>
Info queries using package IDs were no longer working due to commit
c6d84b3a8df10c522d79c754d4f73cb2a352586f, which introduced a table join
in process_query(), thus making the "ID" column ambiguous. Fix this by
explicitly specifying the table to use. Fixes FS#25696.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Segment the upload directory by package name prefix</title>
<updated>2011-08-10T12:34:07Z</updated>
<author>
<name>Dan McGee</name>
<email>dan@archlinux.org</email>
</author>
<published>2011-08-09T22:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=9a79d2105e2dea9876883da65a00d245d475bed2'/>
<id>urn:sha1:9a79d2105e2dea9876883da65a00d245d475bed2</id>
<content type='text'>
This implements the following scheme:

* /packages/cower/ --&gt; /packages/co/cower/
* /packages/j/     --&gt; /packages/j/j/
* /packages/zqy/   --&gt; /packages/zq/zqy/

We take up to the first two characters of each package name as a
intermediate subdirectory, and then the full package name lives
underneath that. Shorter named packages live in a single letter
directory.

Why, you ask? Well because earlier today the AUR hit 32,000 entries in
the unsupported/ directory, making new package uploads impossible. While
some might argue we shouldn't have so many damn packages in the repos,
we should be able to handle this case.

Why two characters instead of one? Our two biggest two-char groups, 'pe'
and 'py', both start with 'p', and have nearly 2000 packages each. Go
Python and Perl.

Still needed is a "move the existing data" script, as well as a set of
rewrite rules for those wishing to preserve backward compatible URLs for
any helper programs doing the wrong thing and relying on them.

Signed-off-by: Dan McGee &lt;dan@archlinux.org&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>rename *.inc files to *.inc.php and adjust imports and references</title>
<updated>2011-06-22T13:15:04Z</updated>
<author>
<name>elij</name>
<email>elij.mx@gmail.com</email>
</author>
<published>2011-05-29T21:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=888db089c515270fd5cd9a9bedd217110f43bc4c'/>
<id>urn:sha1:888db089c515270fd5cd9a9bedd217110f43bc4c</id>
<content type='text'>
Lukas: Add note to "UPGRADING".

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>add first submitted and last modified to rpc output</title>
<updated>2011-05-17T08:46:56Z</updated>
<author>
<name>kachelaqa</name>
<email>kachelaqa@gmail.com</email>
</author>
<published>2011-05-12T11:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=0df6d7b4e7e3735365921ef494ed66738cf53a6b'/>
<id>urn:sha1:0df6d7b4e7e3735365921ef494ed66738cf53a6b</id>
<content type='text'>
after reading the discussion about the submitter field, i looked again
at my previous patch and realized that it was not very good at all.

hopefully this simplified version will be more acceptable.

the justification for this patch is that many third-party tools will
want to know how new a package is, or when it last changed. adding the
submitted and modified timestamps will allow users to get all the
relevant package data in a single query.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>add support for etag and conditional get (if-none-match)</title>
<updated>2011-05-17T08:43:49Z</updated>
<author>
<name>elij</name>
<email>elij.mx@gmail.com</email>
</author>
<published>2011-05-13T19:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=77f3aa56b7bbb70534cdea52ab9c9978e74df525'/>
<id>urn:sha1:77f3aa56b7bbb70534cdea52ab9c9978e74df525</id>
<content type='text'>
Add etag and if-none-match conditional get support. This will allow
'smart client' to save network bandwidth, as they can save the etag hash
value for queries and test it later. Still an http request because this
patch specifically sets a cache lifetime of zero, and must-revalidate.
The benefit here is bandwidth savings. Caching based on expires headers
would likely be counter productive, as the api data can change rather
quickly...but etag is a nice compromise, and could be quite beneficial
for bandwidth recution in some scenarios.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>rpc: unify methods return (fixes FS#17597)</title>
<updated>2011-04-16T15:49:01Z</updated>
<author>
<name>tuxce</name>
<email>tuxce.net@gmail.com</email>
</author>
<published>2011-04-12T15:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=c6d84b3a8df10c522d79c754d4f73cb2a352586f'/>
<id>urn:sha1:c6d84b3a8df10c522d79c754d4f73cb2a352586f</id>
<content type='text'>
Include maintainer in info and search method.

Lukas: Adjustments for "multiinfo" queries.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>rpc: introduce multiinfo query (fixes FS#17583)</title>
<updated>2011-04-16T15:49:00Z</updated>
<author>
<name>Dan McGee</name>
<email>dan@archlinux.org</email>
</author>
<published>2011-04-12T05:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=0488e8597c83ce9dfc75398db197249196157e6d'/>
<id>urn:sha1:0488e8597c83ce9dfc75398db197249196157e6d</id>
<content type='text'>
The majority of "real world" info requests [1] come in hefty batches. We
would be better served to handle these in one request rather than
multiple by allowing AUR clients to send multiple arguments.

This enables things like this to work:
    http://aur.test/rpc.php?type=multiinfo&amp;arg[]=cups-xerox&amp;arg[]=cups-mc2430dl&amp;arg[]=10673

Note to RPC users: unfortunately due to the asinine design of PHP, you
unfortunately have to use the 'arg[]' syntax if you want more than one
query argument, or you will only get the package satisfying the last arg
you pass.

[1] Rough data from April 11, 2011, with a total hit count of 1,109,163:
     12 /login.php
     13 /rpc.php?type=sarch
     15 /rpc.php?type=msearch
     16 /pingserver.php
     16 /rpc.php
     22 /logout.php
    163 /passreset.php
    335 /account.php
    530 /pkgsubmit.php
    916 /rss2.php
   3838 /index.php
   6752 /rss.php
   9699 /
  42478 /rpc.php?type=search
 184737 /packages.php
 681725 /rpc.php?type=info

That means a whopping 61.5% of our requests were for info over the RPC
interface; package pages are a distant second at only 16.7%.

Lukas: Introduce "multiinfo" query instead of extending "info" (for the
sake of backward compatibility).

Signed-off-by: Dan McGee &lt;dan@archlinux.org&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>rpc.php: be a bit more consistent in query building</title>
<updated>2011-04-16T15:49:00Z</updated>
<author>
<name>Dan McGee</name>
<email>dan@archlinux.org</email>
</author>
<published>2011-04-12T05:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=a3ad06015896f132054fece17abb0dfa1808d3b4'/>
<id>urn:sha1:a3ad06015896f132054fece17abb0dfa1808d3b4</id>
<content type='text'>
Do the implode as the same but separate step each time, and remove
indentation where no other query has it.

Signed-off-by: Dan McGee &lt;dan@archlinux.org&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
</feed>
