diff --git a/CHANGELOG b/CHANGELOG index a1e9cb1af..25ce5b42f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG RoundCube Webmail - Write username instead of id in sendmail log (#1485477) - Fix htmlspecialchars() use for PHP version < 5.2.3 (#1485475) - Fix js keywords escaping in json_serialize() for IE/Opera (#1485472) +- Added bin/killcache.php script (#1485434) 2008/10/03 (alec) ---------- diff --git a/bin/dumpschema.php b/bin/dumpschema.php index 53c688c3d..9c9c7b81b 100644 --- a/bin/dumpschema.php +++ b/bin/dumpschema.php @@ -1,4 +1,23 @@ | + +-----------------------------------------------------------------------+ + + $Id$ + +*/ define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' ); require INSTALL_PATH.'program/include/iniset.php'; @@ -44,7 +63,7 @@ else { // 'output_mode' => 'file', 'output' => 'print_schema', ); - + $definition = $schema->getDefinitionFromDatabase(); if (PEAR::isError($definition)) { $error = $definition->getMessage() . ' ' . $definition->getUserInfo(); diff --git a/bin/html2text.php b/bin/html2text.php index 478ccced9..6500d2883 100644 --- a/bin/html2text.php +++ b/bin/html2text.php @@ -1,4 +1,23 @@ | + +-----------------------------------------------------------------------+ + + $Id$ + +*/ define('INSTALL_PATH', realpath('./../') . '/'); require INSTALL_PATH.'program/include/iniset.php'; diff --git a/bin/killcache.php b/bin/killcache.php new file mode 100644 index 000000000..d933f4f2b --- /dev/null +++ b/bin/killcache.php @@ -0,0 +1,56 @@ + | + +-----------------------------------------------------------------------+ + + $Id$ + +*/ + +define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/'); +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!"); +} + + +$dbh =& MDB2::factory($config->get('db_dsnw'), $options); +if (PEAR::isError($dbh)) { + 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()); +}; + +$res =& $dbh->exec("DELETE FROM messages"); +if (PEAR::isError($res)) { + $dbh->disconnect(); + exit($res->getMessage()); +}; + +echo "Cache cleared\n"; + +$dbh->disconnect(); + +?> diff --git a/bin/modcss.php b/bin/modcss.php index e97b8ec9c..fc6305c81 100644 --- a/bin/modcss.php +++ b/bin/modcss.php @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | program/bin/modcss.php | + | bin/modcss.php | | | | This file is part of the RoundCube Webmail client | - | Copyright (C) 2007, RoundCube Dev. - Switzerland | + | Copyright (C) 2007-2008, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -15,7 +15,7 @@ | Author: Thomas Bruederli | +-----------------------------------------------------------------------+ - $Id: $ + $Id$ */ diff --git a/bin/quotaimg.php b/bin/quotaimg.php index 97c8b8630..ddd9b728a 100644 --- a/bin/quotaimg.php +++ b/bin/quotaimg.php @@ -1,10 +1,10 @@ | +-----------------------------------------------------------------------+ - $Id: $ + $Id$ */