summaryrefslogtreecommitdiff
path: root/program/steps/utils/killcache.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-08 09:53:22 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-08 09:53:22 +0200
commitcd482ebce6cd776ca294475e2c377e5cc4860388 (patch)
tree1e284197519d58dc39cccc6026cf6d7f6f7be7fb /program/steps/utils/killcache.inc
parent15442512d249380851aaa7878a541559ee4f6782 (diff)
Fix SQL errors handling
Diffstat (limited to 'program/steps/utils/killcache.inc')
-rw-r--r--program/steps/utils/killcache.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/program/steps/utils/killcache.inc b/program/steps/utils/killcache.inc
index 033cdd075..1cb99b879 100644
--- a/program/steps/utils/killcache.inc
+++ b/program/steps/utils/killcache.inc
@@ -27,23 +27,23 @@ if (!$RCMAIL->config->get('devel_mode')) {
// @TODO: transaction here (if supported by DB) would be a good thing
$res = $RCMAIL->db->query("DELETE FROM cache");
-if (PEAR::isError($res)) {
- exit($res->getMessage());
+if ($err = $RCMAIL->db->is_error($res)) {
+ exit($err);
}
$res = $RCMAIL->db->query("DELETE FROM cache_messages");
-if (PEAR::isError($res)) {
- exit($res->getMessage());
+if ($err = $RCMAIL->db->is_error($res)) {
+ exit($err);
}
$res = $RCMAIL->db->query("DELETE FROM cache_index");
-if (PEAR::isError($res)) {
- exit($res->getMessage());
+if ($err = $RCMAIL->db->is_error($res)) {
+ exit($err);
}
$res = $RCMAIL->db->query("DELETE FROM cache_thread");
-if (PEAR::isError($res)) {
- exit($res->getMessage());
+if ($err = $RCMAIL->db->is_error($res)) {
+ exit($err);
}
echo "Cache cleared\n";