diff options
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | bin/dumpschema.php | 21 | ||||
-rw-r--r-- | bin/html2text.php | 19 | ||||
-rw-r--r-- | bin/killcache.php | 56 | ||||
-rw-r--r-- | bin/modcss.php | 6 | ||||
-rw-r--r-- | bin/quotaimg.php | 6 |
6 files changed, 102 insertions, 7 deletions
@@ -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 @@ <?php +/* + + +-----------------------------------------------------------------------+ + | bin/dumpschema.php | + | | + | This file is part of the RoundCube Webmail client | + | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | + | Licensed under the GNU GPL | + | | + | PURPOSE: | + | Dumps database schema in XML format using MDB2_Schema | + | | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli <roundcube@gmail.com> | + +-----------------------------------------------------------------------+ + + $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 @@ <?php +/* + + +-----------------------------------------------------------------------+ + | bin/html2text.php | + | | + | This file is part of the RoundCube Webmail client | + | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | + | Licensed under the GNU GPL | + | | + | PURPOSE: | + | Convert HTML message to plain text | + | | + +-----------------------------------------------------------------------+ + | Author: Thomas Bruederli <roundcube@gmail.com> | + +-----------------------------------------------------------------------+ + + $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 @@ +<?php +/* + + +-----------------------------------------------------------------------+ + | bin/killcache.php | + | | + | This file is part of the RoundCube Webmail client | + | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | + | Licensed under the GNU GPL | + | | + | PURPOSE: | + | Delete rows from cache and messages tables | + | | + +-----------------------------------------------------------------------+ + | Author: Dennis P. Nikolaenko <dennis@nikolaenko.ru> | + +-----------------------------------------------------------------------+ + + $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 <roundcube@gmail.com> | +-----------------------------------------------------------------------+ - $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 @@ <?php /* +-----------------------------------------------------------------------+ - | program/bin/quotaimg.php | + | bin/quotaimg.php | | | | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | + | Copyright (C) 2005-2008, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -14,7 +14,7 @@ | Author: Brett Patterson <brett2@umbc.edu> | +-----------------------------------------------------------------------+ - $Id: $ + $Id$ */ |