From 5d10a620c253325163e61af1d76908cd9dbeb643 Mon Sep 17 00:00:00 2001 From: Gorrie Date: Tue, 8 Dec 2015 17:26:02 +1300 Subject: [PATCH] REmoved enviroment check --- install/PlatoCreative/Install.php | 53 ------------------------------- 1 file changed, 53 deletions(-) diff --git a/install/PlatoCreative/Install.php b/install/PlatoCreative/Install.php index cd693c6..b9a81ca 100755 --- a/install/PlatoCreative/Install.php +++ b/install/PlatoCreative/Install.php @@ -30,51 +30,6 @@ public static function getBasepath() return self::$basePath; } - /** - * Returns a text description of the current environment type. Assumes - * 'live' if it can't determine an environment type. - * @return string - */ - protected static function getEnvironmentType() - { - $envFile = '_ss_environment.php'; - $directory = realpath('.'); - - // Traverse directories "upwards" until we hit an unreadable directory - // or the root of the drive - do { - // Add the trailing slash we need to concatenate properly - $directory .= DIRECTORY_SEPARATOR; - - // If it's readable, go ahead - if (is_readable($directory)) { - // If the file exists, return its path - if (file_exists($directory.$envFile)) { - $file = $directory.$envFile; - } - } else { - // If we can't read the directory, give up - $file = false; - break; - } - - // Go up a level - $directory = dirname($directory); - - // If these are the same, we've hit the root of the drive - } while (dirname($directory) != $directory); - - if ($file) { - include_once $file; - - if (defined('SS_ENVIRONMENT_TYPE')) { - return SS_ENVIRONMENT_TYPE; - } - } - - return 'dev'; - } - /********************** EVENTS **********************/ /** @@ -103,13 +58,6 @@ public static function postInstall(Event $event) exit; } - // Check environment type - if (self::getEnvironmentType() !== 'dev') { - $io->write('LIVE Environment detected, installer will not complete.'); - $io->write('Ensure a _ss_environment.php file exists and is set to DEV.'); - exit; - } - $config['BuildType'] = 'bespoke'; if ($buildType = $io->ask('Is this a bespoke build? Y or N: ')) { if(substr(strtolower($buildType), 0, 1 ) !== "y"){ @@ -161,5 +109,4 @@ public static function postUpdate(Event $event) // echo shell_exec('cd ../../ && php framework/cli-script.php dev/build'); $io->write("postUpdate event triggered."); } - }