blob: 959974b3793ea80b083acc006e49d5b29f888aab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
/**
* @version $Header: /cvsroot/bitweaver/_bit_install/process_sql.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $
* @package install
* @subpackage functions
*/
/**
* Global flag to indicate we are installing
* @ignore
*/
define( 'BIT_INSTALL', 'TRUE' );
global $failedcommands;
// keep some crappy notices from spewing
$_SERVER['HTTP_HOST'] = 'shell';
$_SERVER['SERVER_SOFTWARE'] = 'command_line';
/**
* required setup
*/
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 );
}
}
?>
|