install
[ class tree: install ] [ index: install ] [ all elements ]

Source for file process_sql.php

Documentation is available at process_sql.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package install
  5.  * @subpackage functions
  6.  */
  7.  
  8. /**
  9.  * Global flag to indicate we are installing
  10.  * @ignore
  11.  */
  12. define( 'BIT_INSTALL', 'TRUE' );
  13.     global $failedcommands;
  14. // keep some crappy notices from spewing
  15. $_SERVER['HTTP_HOST'] = 'shell';
  16. $_SERVER['SERVER_SOFTWARE'] = 'command_line';
  17.  
  18. /**
  19.  * required setup
  20.  */
  21. require_once( 'install_lib.php' );
  22. include("../kernel/setup_inc.php");
  23.  
  24. if( count( $argv ) < 2) {
  25.     print "Please enter name of SQL file in db/ directory to process\n";
  26. } else {
  27.     // avoid errors in ADONewConnection() (wrong darabase driver etc...)
  28.     $gBitDb = &ADONewConnection($gBitDbType);
  29.     if( $gBitDb->Connect($gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbName) ) {
  30.         process_sql_file( $argv[1], $gBitDbType, BIT_DB_PREFIX );
  31.     }
  32. }
  33.  
  34. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:17 +0000 by phpDocumentor 1.5.0-lsces