Remove mdb2-wrapper scripts.
authorChuck Hagenbuch <chuck@horde.org>
Wed, 13 Jan 2010 03:03:00 +0000 (22:03 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Wed, 13 Jan 2010 04:32:04 +0000 (23:32 -0500)
These haven't seemed to work for me for a while anyway...

framework/admintools/horde-db-dumpdata.php [deleted file]
framework/admintools/horde-db-dumpschema.php [deleted file]
framework/admintools/horde-db-updatedata.php [deleted file]
framework/admintools/horde-db-updateschema.php [deleted file]

diff --git a/framework/admintools/horde-db-dumpdata.php b/framework/admintools/horde-db-dumpdata.php
deleted file mode 100755 (executable)
index eb233b7..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * Dump the requested tables (or all) from the Horde database to XML data
- * format.
- *
- * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
- *
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @category Horde
- * @package  admintools
- */
-
-// Do CLI checks and environment setup first.
-require_once dirname(__FILE__) . '/horde-base.php';
-require_once $horde_base . '/lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init
-// some variables, etc.
-$cli = Horde_Cli::singleton();
-$cli->init();
-
-// Include needed libraries.
-$horde_authentication = 'none';
-require_once HORDE_BASE . '/lib/base.php';
-
-$manager = Horde_SQL_Manager::getInstance();
-if (is_a($manager, 'PEAR_Error')) {
-    $cli->fatal($manager->toString());
-}
-
-// Get rid of the script name
-array_shift($_SERVER['argv']);
-$tables = array_values($_SERVER['argv']);
-
-$result = $manager->dumpData('php://stdout', $tables);
-if (is_a($result, 'PEAR_Error')) {
-    $cli->fatal($result->toString());
-}
-
-exit(0);
diff --git a/framework/admintools/horde-db-dumpschema.php b/framework/admintools/horde-db-dumpschema.php
deleted file mode 100755 (executable)
index 77e44d0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * Dump the requested tables (or all) from the Horde database to XML schema
- * format.
- *
- * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
- *
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @category Horde
- * @package  admintools
- */
-
-// Do CLI checks and environment setup first.
-require_once dirname(__FILE__) . '/horde-base.php';
-require_once $horde_base . '/lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init
-// some variables, etc.
-$cli = Horde_Cli::singleton();
-$cli->init();
-
-// Include needed libraries.
-$horde_authentication = 'none';
-require_once HORDE_BASE . '/lib/base.php';
-
-$manager = Horde_SQL_Manager::getInstance();
-if (is_a($manager, 'PEAR_Error')) {
-    $cli->fatal($manager->toString());
-}
-
-// Get rid of the script name
-array_shift($_SERVER['argv']);
-$tables = array_values($_SERVER['argv']);
-
-$xml = $manager->dumpSchema($tables);
-if (is_a($xml, 'PEAR_Error')) {
-    $cli->fatal($xml->toString());
-}
-
-echo $xml;
-exit(0);
diff --git a/framework/admintools/horde-db-updatedata.php b/framework/admintools/horde-db-updatedata.php
deleted file mode 100755 (executable)
index aac8dcd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * Update database definitions from the given .xml data file.
- *
- * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
- *
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @category Horde
- * @package  admintools
- */
-
-// Do CLI checks and environment setup first.
-require_once dirname(__FILE__) . '/horde-base.php';
-require_once $horde_base . '/lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init
-// some variables, etc.
-$cli = Horde_Cli::singleton();
-$cli->init();
-
-// Include needed libraries.
-$horde_authentication = 'none';
-require_once HORDE_BASE . '/lib/base.php';
-
-$manager = Horde_SQL_Manager::getInstance();
-if (is_a($manager, 'PEAR_Error')) {
-    $cli->fatal($manager->toString());
-}
-
-// Get arguments.
-array_shift($_SERVER['argv']);
-if (!count($_SERVER['argv'])) {
-    exit("You must specify the data file to update.\n");
-}
-$file = array_shift($_SERVER['argv']);
-$debug = count($_SERVER['argv']) && array_shift($_SERVER['argv']) == 'debug';
-
-$result = $manager->updateData($file, $debug);
-if (is_a($result, 'PEAR_Error')) {
-    $cli->fatal('Failed to update database data: ' . $result->toString());
-    exit(1);
-} elseif ($debug) {
-    echo $result;
-} else {
-    $cli->message('Successfully updated the database with data from "' . $file . '".', 'cli.success');
-}
-exit(0);
diff --git a/framework/admintools/horde-db-updateschema.php b/framework/admintools/horde-db-updateschema.php
deleted file mode 100755 (executable)
index 5a24497..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * Update database definitions from the given .xml schema file.
- *
- * Copyright 2008-2010 The Horde Project (http://www.horde.org/)
- *
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @category Horde
- * @package  admintools
- */
-
-// Do CLI checks and environment setup first.
-require_once dirname(__FILE__) . '/horde-base.php';
-require_once $horde_base . '/lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init
-// some variables, etc.
-$cli = Horde_Cli::singleton();
-$cli->init();
-
-// Include needed libraries.
-$horde_authentication = 'none';
-require_once HORDE_BASE . '/lib/base.php';
-
-$manager = Horde_SQL_Manager::getInstance();
-if (is_a($manager, 'PEAR_Error')) {
-    $cli->fatal($manager->toString());
-}
-
-// Get arguments.
-array_shift($_SERVER['argv']);
-if (!count($_SERVER['argv'])) {
-    exit("You must specify the schema file to update.\n");
-}
-$file = array_shift($_SERVER['argv']);
-$debug = count($_SERVER['argv']) && array_shift($_SERVER['argv']) == 'debug';
-
-$result = $manager->updateSchema($file, $debug);
-if (is_a($result, 'PEAR_Error')) {
-    $cli->fatal('Failed to update database definitions: ' . $result->toString());
-    exit(1);
-} elseif ($debug) {
-    echo $result;
-} else {
-    $cli->message('Successfully updated the database with definitions from "' . $file . '".', 'cli.success');
-}
-exit(0);