diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2009-01-26 17:27:53 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2009-01-26 17:27:53 +0000 |
| commit | c2054afa7eedc62aedf37d0fd2e6deed0d04d170 (patch) | |
| tree | f97dc1e6ab6ac48440fe8ac0b84b0e97926ad4bb /install_version.php | |
| parent | 44e879c7f96f8cbb788f6c6aa612d3bb92e4f677 (diff) | |
| download | install-c2054afa7eedc62aedf37d0fd2e6deed0d04d170.tar.gz install-c2054afa7eedc62aedf37d0fd2e6deed0d04d170.tar.bz2 install-c2054afa7eedc62aedf37d0fd2e6deed0d04d170.zip | |
generate valid version number before trying to store it.
Diffstat (limited to 'install_version.php')
| -rw-r--r-- | install_version.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/install_version.php b/install_version.php index 83aff72..dc5bf6f 100644 --- a/install_version.php +++ b/install_version.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_install/install_version.php,v 1.1 2008/10/03 10:14:15 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_install/install_version.php,v 1.2 2009/01/26 17:27:53 squareing Exp $ * @package install * @subpackage functions */ @@ -50,10 +50,17 @@ if( !empty( $_REQUEST['update_version'] )) { if( !empty( $upToDate ) || !empty( $_REQUEST['skip'] )) { // if we're already up to date, we'll simply move on to the next page bit_redirect( $_SERVER['PHP_SELF']."?step=".++$step ); - } elseif( $gBitSystem->storeVersion( NULL, BIT_MAJOR_VERSION.".".BIT_MINOR_VERSION.".".BIT_SUB_VERSION."-".BIT_LEVEL )) { - // display the confirmation page - $gBitSmarty->assign( 'next_step', $step + 1 ); - $app = '_done'; + } else { + $bitversion = BIT_MAJOR_VERSION.".".BIT_MINOR_VERSION.".".BIT_SUB_VERSION; + if( defined( BIT_LEVEL ) && BIT_LEVEL != '' ) { + $bitversion .= '-'.BIT_LEVEL; + } + + if( $gBitSystem->storeVersion( NULL, $bitversion )) { + // display the confirmation page + $gBitSmarty->assign( 'next_step', $step + 1 ); + $app = '_done'; + } } } ?> |
