diff options
| author | till <till@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-17 03:27:41 +0000 |
|---|---|---|
| committer | till <till@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-17 03:27:41 +0000 |
| commit | 31dc3bef7516269b9018e79596e6624ccf3c22da (patch) | |
| tree | 45adcc6792c089d346039c9aef41be1c930dc7c0 /roundcubemail | |
| parent | 31047effc54b57584f26aaeec21ab7d15ca56021 (diff) | |
* minor fixes: cs and a notice
git-svn-id: https://svn.roundcube.net/trunk@2238 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/bin/killcache.php | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/roundcubemail/bin/killcache.php b/roundcubemail/bin/killcache.php index 93a1fba24..7bce676fb 100644 --- a/roundcubemail/bin/killcache.php +++ b/roundcubemail/bin/killcache.php @@ -20,34 +20,43 @@ */ define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/'); -require INSTALL_PATH.'program/include/iniset.php'; +require INSTALL_PATH . 'program/include/iniset.php'; $config = new rcube_config(); // don't allow public access if not in devel_mode if (!$config->get('devel_mode') && $_SERVER['REMOTE_ADDR']) { - header("HTTP/1.0 401 Access denied"); - die("Access denied!"); + header("HTTP/1.0 401 Access denied"); + die("Access denied!"); } +$options = array( + 'use_transactions' => false, + 'log_line_break' => "\n", + 'idxname_format' => '%s', + 'debug' => false, + 'quote_identifier' => true, + 'force_defaults' => false, + 'portability' => true +); -$dbh =& MDB2::factory($config->get('db_dsnw'), $options); +$dbh = MDB2::factory($config->get('db_dsnw'), $options); if (PEAR::isError($dbh)) { - exit($mdb2->getMessage()); + exit($mdb2->getMessage()); } //TODO: transaction here (if supported by DB) would be a good thing $res =& $dbh->exec("DELETE FROM cache"); if (PEAR::isError($res)) { - $dbh->disconnect(); - exit($res->getMessage()); -}; + $dbh->disconnect(); + exit($res->getMessage()); +} $res =& $dbh->exec("DELETE FROM messages"); if (PEAR::isError($res)) { - $dbh->disconnect(); - exit($res->getMessage()); -}; + $dbh->disconnect(); + exit($res->getMessage()); +} echo "Cache cleared\n"; |
