From 0ee69a3b7a0d98225ff6de783d470c0014174c7a Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Tue, 12 Jan 2010 22:03:00 -0500 Subject: [PATCH] Remove mdb2-wrapper scripts. These haven't seemed to work for me for a while anyway... --- framework/admintools/horde-db-dumpdata.php | 46 ---------------------- framework/admintools/horde-db-dumpschema.php | 47 ----------------------- framework/admintools/horde-db-updatedata.php | 53 -------------------------- framework/admintools/horde-db-updateschema.php | 53 -------------------------- 4 files changed, 199 deletions(-) delete mode 100755 framework/admintools/horde-db-dumpdata.php delete mode 100755 framework/admintools/horde-db-dumpschema.php delete mode 100755 framework/admintools/horde-db-updatedata.php delete mode 100755 framework/admintools/horde-db-updateschema.php diff --git a/framework/admintools/horde-db-dumpdata.php b/framework/admintools/horde-db-dumpdata.php deleted file mode 100755 index eb233b7eb..000000000 --- a/framework/admintools/horde-db-dumpdata.php +++ /dev/null @@ -1,46 +0,0 @@ -#!@php_bin@ - - * @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 index 77e44d082..000000000 --- a/framework/admintools/horde-db-dumpschema.php +++ /dev/null @@ -1,47 +0,0 @@ -#!@php_bin@ - - * @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 index aac8dcded..000000000 --- a/framework/admintools/horde-db-updatedata.php +++ /dev/null @@ -1,53 +0,0 @@ -#!@php_bin@ - - * @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 index 5a2449713..000000000 --- a/framework/admintools/horde-db-updateschema.php +++ /dev/null @@ -1,53 +0,0 @@ -#!@php_bin@ - - * @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); -- 2.11.0