summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xincludes/install_packages.php6
-rwxr-xr-xtemplates/install_packages.tpl4
2 files changed, 6 insertions, 4 deletions
diff --git a/includes/install_packages.php b/includes/install_packages.php
index 257c1b0..3401d76 100755
--- a/includes/install_packages.php
+++ b/includes/install_packages.php
@@ -143,7 +143,7 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$installedPackages = [];
foreach( array_keys( $gBitInstaller->mPackages ) as $key ) {
if( !empty( $gBitInstaller->mPackages[$key]['installed'] ) ) {
- array_push( $installedPackages, $package );
+ array_push( $installedPackages, $key );
}
}
@@ -403,11 +403,13 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$gBitSystem->storeConfig( 'package_'.$package , NULL );
$gBitSystem->storeConfig( 'package_'.$package , 'y', $package );
- // we can assume that the latest upgrade version available for a package is the most current version number for that package
+ // Store version: prefer latest upgrade file, then schema-declared, then BITWEAVER_VERSION baseline
if( $version = $gBitInstaller->getLatestUpgradeVersion( $package )) {
$gBitSystem->storeVersion( $package, $version );
} elseif( !empty( $gBitInstaller->mPackages[$package]['version'] )) {
$gBitSystem->storeVersion( $package, $gBitInstaller->mPackages[$package]['version'] );
+ } else {
+ $gBitSystem->storeVersion( $package, BITWEAVER_VERSION );
}
$gBitInstaller->mPackages[ $package ]['installed'] = TRUE;
diff --git a/templates/install_packages.tpl b/templates/install_packages.tpl
index a1e61d9..4f600ce 100755
--- a/templates/install_packages.tpl
+++ b/templates/install_packages.tpl
@@ -21,9 +21,9 @@
<input type="hidden" name="step" value="{$next_step}" />
<input type="hidden" name="method" value="install" />
- {* include required packages during first install *}
+ {* include required packages during first install only *}
{foreach from=$schema key=package item=item}
- {if $item.required|default:false and !$item.installed}
+ {if $first_install and $item.required|default:false and !$item.installed}
<input type="hidden" name="packages[]" value="{$package}" />
{/if}
{/foreach}