Skip to content

[C2] Add .env detector in public/main/install/index.php #6519

@ywarnier

Description

@ywarnier

If C2 is already installed, main/install/index.php should show a message that the installation is already there and prevent loading anything else, as currently it shows system information.

This should include a detection of the version, as it is necessary to create the .env file (or make the root folder writeable) to start a new installation (so just detecting .env would not be enough).

I would do something like this:

if (.env exists) {
    if (APP_INSTALLED !== '1') {
        Launch install wizard
    } else {
        if (version from settings.variable='chamilo_database_version' < current installer version from public/main/install/version.php) {
             Launch install wizard
        } else {
             Show error message and block execution of install wizard
        }
    }
} else {
    Launch install wizard
}

I'm not sure we want to keep using chamilo_database_version long term, but it's a usable source for now

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions