diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-18 15:26:25 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-18 15:26:25 +0100 |
| commit | b73c6868cd22de46af8e84fc0eb99933d7a92199 (patch) | |
| tree | 8e59df4e5493c914eb1c1a60df843662eee2b847 | |
| parent | 5005b83ea1cafbed4361462fa3fea649f9a95cf4 (diff) | |
| download | install-b73c6868cd22de46af8e84fc0eb99933d7a92199.tar.gz install-b73c6868cd22de46af8e84fc0eb99933d7a92199.tar.bz2 install-b73c6868cd22de46af8e84fc0eb99933d7a92199.zip | |
tidy first install logic so that installed opens in the right place
| -rwxr-xr-x | includes/install_inc.php | 2 | ||||
| -rwxr-xr-x | install.php | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/includes/install_inc.php b/includes/install_inc.php index 3af13d6..7b835a0 100755 --- a/includes/install_inc.php +++ b/includes/install_inc.php @@ -40,7 +40,7 @@ function set_menu( $pInstallFiles, $pStep ) { foreach( $pInstallFiles as $key => $menu_step ) { if( !isset( $menu_step['state'] ) ) { - if( !empty( $gBitDbType ) && $gBitUser->isAdmin() && !$_SESSION['first_install'] ) { + if( !empty( $gBitDbType ) && !isset( $_SESSION['first_install'] ) ) { $pInstallFiles[$key]['state'] = 'complete'; $pInstallFiles[$key]['icon'] = 'icon-ok'; } else { diff --git a/install.php b/install.php index be27b22..a5a7be7 100755 --- a/install.php +++ b/install.php @@ -87,7 +87,11 @@ if( !empty( $_REQUEST['reload'] )) { } // for pages that should only be shown during a first install -if( ( empty( $gBitDbType ) || !$gBitUser->isAdmin() ) || ( $_SESSION['first_install'] ) ) { +// Drive first-install mode from DB state only — installer access is controlled externally via symlink +if( !empty( $gBitDbType ) && $gBitInstaller->isInstalled() ) { + unset( $_SESSION['first_install'] ); +} +if( empty( $gBitDbType ) || isset( $_SESSION['first_install'] ) ) { $onlyDuringFirstInstall = TRUE; $_SESSION['first_install'] = TRUE; } else { |
