diff options
author | Felix Epp <work@felixepp.de> | 2016-10-01 12:17:55 +0200 |
---|---|---|
committer | Felix A. Epp <work@felixepp.de> | 2016-11-16 22:28:49 +0100 |
commit | 1614b310ef0e4871dc5f21630e887010e0fb22bc (patch) | |
tree | 5a0780404a0920375a249613c9452b01e7766387 /tests | |
parent | 50929751b05e9ff09ecad7dde733178f7120e77c (diff) | |
download | nextcloud-server-1614b310ef0e4871dc5f21630e887010e0fb22bc.tar.gz nextcloud-server-1614b310ef0e4871dc5f21630e887010e0fb22bc.zip |
Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
Added the system config which sets all conditions to true that query the
FrontControllerActive mod_env variable.
Signed-off-by: Felix A. Epp <work@felixepp.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/UtilTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 60e50f750ea..278e6cfd4ce 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -350,6 +350,7 @@ class UtilTest extends \Test\TestCase { public function testGetDefaultPageUrlWithRedirectUrlWithoutFrontController() { putenv('front_controller_active=false'); + \OC::$server->getConfig()->deleteSystemValue('htaccess.IgnoreFrontController'); $_REQUEST['redirect_url'] = 'myRedirectUrl.com'; $this->assertSame('http://localhost'.\OC::$WEBROOT.'/myRedirectUrl.com', OC_Util::getDefaultPageUrl()); @@ -357,6 +358,7 @@ class UtilTest extends \Test\TestCase { public function testGetDefaultPageUrlWithRedirectUrlRedirectBypassWithoutFrontController() { putenv('front_controller_active=false'); + \OC::$server->getConfig()->deleteSystemValue('htaccess.IgnoreFrontController'); $_REQUEST['redirect_url'] = 'myRedirectUrl.com@foo.com:a'; $this->assertSame('http://localhost'.\OC::$WEBROOT.'/index.php/apps/files/', OC_Util::getDefaultPageUrl()); @@ -368,6 +370,14 @@ class UtilTest extends \Test\TestCase { $this->assertSame('http://localhost'.\OC::$WEBROOT.'/apps/files/', OC_Util::getDefaultPageUrl()); } + public function testGetDefaultPageUrlWithRedirectUrlWithIgnoreFrontController() { + putenv('front_controller_active=false'); + \OC::$server->getConfig()->setSystemValue('htaccess.IgnoreFrontController', true); + + $_REQUEST['redirect_url'] = 'myRedirectUrl.com@foo.com:a'; + $this->assertSame('http://localhost'.\OC::$WEBROOT.'/apps/files/', OC_Util::getDefaultPageUrl()); + } + /** * Test needUpgrade() when the core version is increased */ |