From: Tim Düsterhus Date: Fri, 7 Aug 2015 23:36:45 +0000 (+0200) Subject: Allow to choose default WCF dir via env in WCFSetup X-Git-Tag: 3.0.0_Beta_1~2139^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa30b1d109c026d433604e16224fb152d3c3a6ba;p=GitHub%2FWoltLab%2FWCF.git Allow to choose default WCF dir via env in WCFSetup --- 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);