Commit graph

4 commits

Author SHA1 Message Date
Lukas Fleischer
4f662c773d Check query return value in db_cache_value()
Instead of unconditionally calling fetch on the return value of query(),
error out early if the value evaluates to false.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
2017-04-18 08:40:22 +02:00
canyonknight
8d6c872297 Remove unnecessary database connection parameter from all functions
All functions now have a database connection method that will use
the same database connection. This imitates the functionality of
passing a database connection as an argument and makes it redundant.

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2013-02-10 12:10:38 +01:00
canyonknight
e171f6f34e Migrate all DB code to use PDO
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 <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2012-09-18 00:58:46 +02:00
elij
5853097561 Make cache type selectable based on config value
Provie a mechanism to specify cache type from NONE, APC, or MEMCACHE
based on a config variable.

If MEMCACHE type is selected, a list of servers can be specified to
provide multiserver support. Note that php-memcaced is required for
MEMCACHE support.

Lukas: Minor commenting style fixes.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-06-22 15:21:21 +02:00