summaryrefslogtreecommitdiff
path: root/BitInstaller.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-11-16 10:29:54 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-11-16 10:29:54 +0000
commit33bd9b776ce689546ea7b5223cb4143dffd7e312 (patch)
tree83d5b2137b14a6637740601adabf6425a772f06e /BitInstaller.php
parent4104efd5ea5f609dc7f9c60fbdc74fbf1edf5e0c (diff)
downloadinstall-33bd9b776ce689546ea7b5223cb4143dffd7e312.tar.gz
install-33bd9b776ce689546ea7b5223cb4143dffd7e312.tar.bz2
install-33bd9b776ce689546ea7b5223cb4143dffd7e312.zip
update some inline comments and indicate what version we're upgrading from.
Diffstat (limited to 'BitInstaller.php')
-rw-r--r--BitInstaller.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/BitInstaller.php b/BitInstaller.php
index 1ff2ce0..e099863 100644
--- a/BitInstaller.php
+++ b/BitInstaller.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.48 2008/11/15 09:05:32 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.49 2008/11/16 10:29:54 squareing Exp $
* @package install
*/
@@ -273,13 +273,17 @@ class BitInstaller extends BitSystem {
// make sure everything is in the right order
uksort( $this->mPackageUpgrades[$pPackage], 'upgrade_version_sort' );
- foreach( $this->mPackageUpgrades[$pPackage] as $version => $package ) {
+ foreach( array_keys( $this->mPackageUpgrades[$pPackage] ) as $version ) {
+ // version we are upgrading from
+ $this->mPackageUpgrades[$pPackage][$version]['from_version'] = $this->getVersion( $pPackage );
+
+ // apply upgrade
$errors[$version] = $this->applyUpgrade( $pPackage, $this->mPackageUpgrades[$pPackage][$version]['upgrade'] );
if( !empty( $errors[$version] )) {
return $errors;
} else {
- // if the upgrade ended without incidence, we store the package version
- // this way we store the version after every successful step to avoid duplicate upgrades
+ // if the upgrade ended without incidence, we store the package version.
+ // this way any successfully applied upgrade can only be applied once.
$this->storeVersion( $pPackage, $version );
}
}