From fffb059293d8accf9635a4cc27e0862a76ecca4f Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Fri, 18 Sep 2015 13:47:50 -0700 Subject: [PATCH] =?UTF-8?q?Fixes=20#77,=20Schr=C3=B6dinger's=20Cache:=20Do?= =?UTF-8?q?=20not=20set=20install=5Fstate=20unless=20installing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sites/default/settings.pantheon.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sites/default/settings.pantheon.php b/sites/default/settings.pantheon.php index a09ae27e4..7823a5bea 100644 --- a/sites/default/settings.pantheon.php +++ b/sites/default/settings.pantheon.php @@ -1,5 +1,8 @@ 'sites/default/files', CONFIG_STAGING_DIRECTORY => 'sites/default/files', @@ -33,7 +36,11 @@ else { * Issue: https://github.com/pantheon-systems/drops-8/issues/9 * */ -if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { +if ( + isset($_ENV['PANTHEON_ENVIRONMENT']) && + $is_installer_url && + (php_sapi_name() != "cli") +) { $GLOBALS['install_state']['settings_verified'] = TRUE; } @@ -45,7 +52,13 @@ if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { * c.f. https://github.com/pantheon-systems/drops-8/pull/53 * */ -if (isset($_ENV['PANTHEON_ENVIRONMENT']) && (substr($_SERVER['SCRIPT_NAME'],0,17) != '/core/install.php') && (!is_dir(__DIR__ . '/files/styles')) && (php_sapi_name() != "cli")) { +if ( + isset($_ENV['PANTHEON_ENVIRONMENT']) && + !$is_installer_url && + (!is_dir(__DIR__ . '/files/styles')) && + (empty($GLOBALS['install_state'])) && + (php_sapi_name() != "cli") +) { include_once __DIR__ . '/../../core/includes/install.core.inc'; include_once __DIR__ . '/../../core/includes/install.inc'; install_goto('core/install.php');