summaryrefslogtreecommitdiff
path: root/process_sql.php
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:51:19 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 04:51:19 +0000
commitf2c6619fcf9489f34354efe9a9eab3dd73db773e (patch)
tree8640b8d4ca95a864be32d785a4b31d64ef46032f /process_sql.php
downloadinstall-f2c6619fcf9489f34354efe9a9eab3dd73db773e.tar.gz
install-f2c6619fcf9489f34354efe9a9eab3dd73db773e.tar.bz2
install-f2c6619fcf9489f34354efe9a9eab3dd73db773e.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'process_sql.php')
-rw-r--r--process_sql.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/process_sql.php b/process_sql.php
new file mode 100644
index 0000000..553ecb2
--- /dev/null
+++ b/process_sql.php
@@ -0,0 +1,23 @@
+<?php
+// Global flag to indicate we are installin
+define( 'BIT_INSTALL', 'TRUE' );
+ global $failedcommands;
+// keep some crappy notices from spewing
+$_SERVER['HTTP_HOST'] = 'shell';
+$_SERVER['SERVER_SOFTWARE'] = 'command_line';
+
+
+require_once( 'install_lib.php' );
+include("../bit_setup_inc.php");
+
+if( count( $argv ) < 2) {
+ print "Please enter name of SQL file in db/ directory to process\n";
+} else {
+ // avoid errors in ADONewConnection() (wrong darabase driver etc...)
+ $gBitDb = &ADONewConnection($gBitDbType);
+ if( $gBitDb->Connect($gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbName) ) {
+ process_sql_file( $argv[1], $gBitDbType, BIT_DB_PREFIX );
+ }
+}
+
+?>