Hermes: update purge script
authorBen Klang <ben@alkaloid.net>
Wed, 26 May 2010 18:45:56 +0000 (14:45 -0400)
committerBen Klang <ben@alkaloid.net>
Wed, 2 Jun 2010 19:22:24 +0000 (15:22 -0400)
hermes/scripts/purge.php

index b9011db..81680ba 100755 (executable)
@@ -1,9 +1,7 @@
 #!/usr/bin/php
 <?php
 /**
- * $Horde: hermes/scripts/purge.php,v 1.14 2009/07/09 06:08:43 slusarz Exp $
- *
- * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
+ * Copyright 2002-2010 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
@@ -11,17 +9,8 @@
  * @author Chuck Hagenbuch <chuck@horde.org>
  */
 
-@define('HERMES_BASE', dirname(__FILE__) . '/..');
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-require_once HORDE_BASE . '/lib/core.php';
-
-// Registry
-$registry = Horde_Registry::singleton();
-$registry->pushApp('hermes', false);
-
-// Hermes base libraries.
-require_once HERMES_BASE . '/lib/Hermes.php';
-$hermes = &Hermes::getDriver();
+require_once dirname(__FILE__) . '/lib/Application.php';
+$hermes = Horde_Registry::appInit('hermes');
 
 printf(_("Deleting data that was exported/billed more than %s days ago.\n"), $conf['time']['days_to_keep']);
-$hermes->purge();
+$hermes->driver->purge();