<feed xmlns='http://www.w3.org/2005/Atom'>
<title>markzz/aurweb.git/web/lib/aurjson.class.php, branch v2.2.1</title>
<subtitle>aurweb working repository</subtitle>
<id>https://git.markzz.net/markzz/aurweb.git/atom/web/lib/aurjson.class.php?h=v2.2.1</id>
<link rel='self' href='https://git.markzz.net/markzz/aurweb.git/atom/web/lib/aurjson.class.php?h=v2.2.1'/>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/'/>
<updated>2013-02-10T11:10:37Z</updated>
<entry>
<title>Add database wrapper class and new connection method</title>
<updated>2013-02-10T11:10:37Z</updated>
<author>
<name>canyonknight</name>
<email>canyonknight@gmail.com</email>
</author>
<published>2013-02-03T16:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=8e03e68d687015b5cd8c9d3857e1a1d007252afa'/>
<id>urn:sha1:8e03e68d687015b5cd8c9d3857e1a1d007252afa</id>
<content type='text'>
Uses the Singleton pattern to ensure all queries use the same
database connection that is released upon script completion.

All database connections should now be called with DB::connect() and
not db_connect().

Signed-off-by: canyonknight &lt;canyonknight@gmail.com&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Implemented typeahead suggest</title>
<updated>2013-01-19T11:17:55Z</updated>
<author>
<name>Marcel Korpel</name>
<email>marcel.lists@gmail.com</email>
</author>
<published>2012-12-23T21:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=b004333eadb9a4db57592bb501b28edced708943'/>
<id>urn:sha1:b004333eadb9a4db57592bb501b28edced708943</id>
<content type='text'>
Use Twitter Bootstrap JavaScript framework for typeahead support.

Add a new "suggest" JSON method, which returns the first 20
packages that match the beginning characters of a query.

canyonknight: Link format change, commit message
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>aurjson.class.php: Limit number of RPC results</title>
<updated>2012-10-22T10:33:13Z</updated>
<author>
<name>canyonknight</name>
<email>canyonknight@gmail.com</email>
</author>
<published>2012-10-21T19:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=43a69e7127c65f2651a61300d3e32bf6f89a2595'/>
<id>urn:sha1:43a69e7127c65f2651a61300d3e32bf6f89a2595</id>
<content type='text'>
With no limit to the number of results, memory_limit set to 32M
can easily be exceeded for searches that have a large number of
results. This results in an HTTP error 500 for those queries.

Limit results to an amount set within config.inc.php to avoid
exceeding memory_limit. Introduce new JSON error code for when
the result limit is hit.

Fixes FS#31849

Signed-off-by: canyonknight &lt;canyonknight@gmail.com&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Migrate all DB code to use PDO</title>
<updated>2012-09-17T22:58:46Z</updated>
<author>
<name>canyonknight</name>
<email>canyonknight@gmail.com</email>
</author>
<published>2012-08-08T22:09:51Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=e171f6f34eeacf35cf7142b4788d43e7d0978546'/>
<id>urn:sha1:e171f6f34eeacf35cf7142b4788d43e7d0978546</id>
<content type='text'>
All DB code currently uses the quickly aging mysql_* functions. These
functions are strongly discouraged and may eventually be deprecated.

Transition all code to utilize the PDO data access abstraction layer. PDO
allows for consistent query code across multiple databases. This could
potentially allow for someone to use a database other than MySQL with
minimal code changes.

All functions and behaviors are reproduced as faithfully as possible with
PDO equivalents and some changes in code.

Signed-off-by: canyonknight &lt;canyonknight@gmail.com&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>RPC: Do not return an error on 0 results</title>
<updated>2011-11-03T07:48:20Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-11-03T07:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=0557f7705ab12c84e53a5f2dc352557b908af511'/>
<id>urn:sha1:0557f7705ab12c84e53a5f2dc352557b908af511</id>
<content type='text'>
Return an empty array and set the result count to zero instead.

Before:

    $ curl 'http://localhost/rpc.php?type=search&amp;arg=raboof'
    {"type":"error","resultcount":0,"results":"No results found"}

After:

    $ curl 'http://localhost/rpc.php?type=search&amp;arg=raboof'
    {"type":"search","resultcount":0,"results":[]}

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>aurjson: add result count to JSON result</title>
<updated>2011-11-02T20:21:23Z</updated>
<author>
<name>Dave Reisner</name>
<email>d@falconindy.com</email>
</author>
<published>2011-10-25T22:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=168a51431bda11d2250a26e8acb8b05c0876092e'/>
<id>urn:sha1:168a51431bda11d2250a26e8acb8b05c0876092e</id>
<content type='text'>
We already ask for the result count, but only use it as a basis for testing
query success or failure. Add the value to the JSON reply.

Signed-off-by: Dave Reisner &lt;dreisner@archlinux.org&gt;
Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Escape wildcards in "LIKE" patterns</title>
<updated>2011-10-24T15:57:54Z</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=47c5167acb0a4a2c809c03dc664fea1d130d0c8b'/>
<id>urn:sha1:47c5167acb0a4a2c809c03dc664fea1d130d0c8b</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-24T15:57:54Z</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=323d418f02074613241d65b9cabbfd65afea9abe'/>
<id>urn:sha1:323d418f02074613241d65b9cabbfd65afea9abe</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;
</content>
</entry>
<entry>
<title>RPC: Coerce numeric values into integers</title>
<updated>2011-09-23T13:30:32Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-08-20T23:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=795971bc806776ad48de6f0135736cbaaefa5fcd'/>
<id>urn:sha1:795971bc806776ad48de6f0135736cbaaefa5fcd</id>
<content type='text'>
Coerce following fields into integers to ensure json_encode() serializes
them as integers:

* ID
* CategoryID
* NumVotes
* OutOfDate
* FirstSubmitted
* LastModified

This means that there will be a minor API break. There's no better way
to do this properly, though. Fixes FS#25693.

Signed-off-by: Lukas Fleischer &lt;archlinux@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>RPC: Provide out-of-date timestamp</title>
<updated>2011-09-23T12:05:41Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>archlinux@cryptocrack.de</email>
</author>
<published>2011-09-23T11:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.markzz.net/markzz/aurweb.git/commit/?id=04a0fd47482f513c24645eb3f8b88b07303f9ec4'/>
<id>urn:sha1:04a0fd47482f513c24645eb3f8b88b07303f9ec4</id>
<content type='text'>
Convert the "OutOfDate" field to provide a timestamp instead of a
boolean flag in JSON results. We don't really care about backward
compatibility here, as most AUR helpers would break anyway when trying
to parse RPC responses after the data type overhaul that should come
with one of the following patches.

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