Skip to content

Commit

Permalink
MatomoInstall: temporary plug to the core
Browse files Browse the repository at this point in the history
  • Loading branch information
AbcSxyZ committed Mar 13, 2020
1 parent a391f00 commit 5bb4565
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/Application/Kernel/EnvironmentValidator.php
Expand Up @@ -11,6 +11,7 @@
use Piwik\Common;
use Piwik\Exception\NotYetInstalledException;
use Piwik\Filechecks;
use Piwik\MatomoInstaller;
use Piwik\Piwik;
use Piwik\SettingsPiwik;
use Piwik\SettingsServer;
Expand Down Expand Up @@ -59,6 +60,9 @@ public function validate()
$startInstaller = false;
}

if (MatomoInstaller::isHeadlessInstall())
MatomoInstaller::installFromConfig();

// Start the installation when config file not found
$this->checkConfigFileExists($this->settingsProvider->getPathLocal(), $startInstaller);

Expand Down
3 changes: 3 additions & 0 deletions core/SettingsPiwik.php
Expand Up @@ -11,6 +11,7 @@
use Exception;
use Piwik\Cache as PiwikCache;
use Piwik\Container\StaticContainer;
use Piwik\MatomoInstaller;

/**
* Contains helper methods that can be used to get common Piwik settings.
Expand Down Expand Up @@ -220,6 +221,8 @@ public static function getPiwikUrl()
*/
public static function isMatomoInstalled()
{
if (MatomoInstaller::isHeadlessInstall())
return false;
$config = Config::getInstance()->getLocalPath();
$exists = file_exists($config);

Expand Down

0 comments on commit 5bb4565

Please sign in to comment.