diff options
| author | Sean Lee <seannerd@users.sourceforge.net> | 2006-02-22 03:13:31 +0000 |
|---|---|---|
| committer | Sean Lee <seannerd@users.sourceforge.net> | 2006-02-22 03:13:31 +0000 |
| commit | c3c994c7614068c3434cfb0e3671ae19e6e17df6 (patch) | |
| tree | 47ca915160db566a10d0eb184ae0fd84c0cfed8c /install_packages.php | |
| parent | 5571db4a1afd09491adddc399cb24d02434c2be2 (diff) | |
| download | install-c3c994c7614068c3434cfb0e3671ae19e6e17df6.tar.gz install-c3c994c7614068c3434cfb0e3671ae19e6e17df6.tar.bz2 install-c3c994c7614068c3434cfb0e3671ae19e6e17df6.zip | |
Move SchemaDefault INSERTs after creation of users_users and users_group records. Thanks, spiderr.
No more constraint violations were seen as of this moment.
Diffstat (limited to 'install_packages.php')
| -rw-r--r-- | install_packages.php | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/install_packages.php b/install_packages.php index 3e8b98e..0549ff6 100644 --- a/install_packages.php +++ b/install_packages.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.30 2006/02/17 23:04:35 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.31 2006/02/22 03:13:31 seannerd Exp $ * @package install * @subpackage functions */ @@ -184,24 +184,6 @@ if( !empty( $_REQUEST['cancel'] ) ) { $gBitInstaller->storePreference( 'package_phpbb', 'y', PHPBB_PKG_NAME ); } - // 4. run the defaults through afterwards so we can be sure all tables needed have been created - foreach( array_keys( $gBitInstaller->mPackages ) as $package ) { - if( in_array( $package, $_REQUEST['packages'] ) || ( empty( $gBitInstaller->mPackages[$package]['installed'] ) && !empty( $gBitInstaller->mPackages[$package]['required'] ) ) ) { - if( $method == 'install' || $method == 'reinstall' ) { - // this list of installed packages is used to show newly installed packages - if( !empty( $gBitInstaller->mPackages[$package]['defaults'] ) ) { - foreach( $gBitInstaller->mPackages[$package]['defaults'] as $def ) { - if ($gBitInstaller->mDb->mType == 'firebird' ) $def = preg_replace("/\\\'/","''", $def ); - $gBitInstaller->mDb->query( $def ); - } - } - } else { - // This is where any links to clear data not in the current package will be processed - } - // this is to list any processed packages - $packageList[$method][] = $package; - } - } // only install modules during the first install if( isset( $_SESSION['first_install'] ) && $_SESSION['first_install'] == TRUE ) { /** @@ -265,6 +247,27 @@ if( !empty( $_REQUEST['cancel'] ) ) { unset( $_SESSION['email'] ); } + // 4. run the defaults through afterwards so we can be sure all tables needed have been created + foreach( array_keys( $gBitInstaller->mPackages ) as $package ) { + if (!empty($package)) { + if( in_array( $package, $_REQUEST['packages'] ) || ( empty( $gBitInstaller->mPackages[$package]['installed'] ) && !empty( $gBitInstaller->mPackages[$package]['required'] ) ) ) { + if( $method == 'install' || $method == 'reinstall' ) { + // this list of installed packages is used to show newly installed packages + if( !empty( $gBitInstaller->mPackages[$package]['defaults'] ) ) { + foreach( $gBitInstaller->mPackages[$package]['defaults'] as $def ) { + if ($gBitInstaller->mDb->mType == 'firebird' ) $def = preg_replace("/\\\'/","''", $def ); + $gBitInstaller->mDb->query( $def ); + } + } + } else { + // This is where any links to clear data not in the current package will be processed + } + // this is to list any processed packages + $packageList[$method][] = $package; + } + } + } + $gBitSmarty->assign( 'next_step', $step + 1 ); asort( $packageList ); $gBitSmarty->assign( 'packageList', $packageList ); |
