From aa30b1d109c026d433604e16224fb152d3c3a6ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 8 Aug 2015 01:36:45 +0200 Subject: [PATCH] Allow to choose default WCF dir via env in WCFSetup --- wcfsetup/install/files/lib/system/WCFSetup.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 598850a8b7..b3e7ade098 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -161,6 +161,10 @@ class WCFSetup extends WCF { * Gets the selected wcf dir from request. */ protected static function getWCFDir() { + if (self::$developerMode && isset($_ENV['WCFSETUP_USEDEFAULTWCFDIR'])) { + $_REQUEST['wcfDir'] = FileUtil::unifyDirSeparator(INSTALL_SCRIPT_DIR).'wcf/'; + } + if (isset($_REQUEST['wcfDir']) && $_REQUEST['wcfDir'] != '') { self::$wcfDir = FileUtil::addTrailingSlash(FileUtil::unifyDirSeparator($_REQUEST['wcfDir'])); if (@file_exists(self::$wcfDir)) { @@ -274,9 +278,11 @@ class WCFSetup extends WCF { } case 'searchWcfDir': - $this->calcProgress(3); - $this->searchWcfDir(); - break; + if (!self::$developerMode || !isset($_ENV['WCFSETUP_USEDEFAULTWCFDIR'])) { + $this->calcProgress(3); + $this->searchWcfDir(); + break; + } case 'unzipFiles': $this->calcProgress(4); -- 2.20.1