Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-07-07 16:39:06 +0400
committerMorris Jobke <hey@morrisjobke.de>2014-07-07 21:39:20 +0400
commitf5e4ebf2bac0ac31d3bf0388c7ea607aeedc2f35 (patch)
tree136cd38941a28e71d19b11b25c111d1f1f5a94da /lib/private/request.php
parent2bfdd02c2a3143c0f4d280f614ea3527ca4e8f6b (diff)
Only overwrite serverHost when in unit tests
The intention of the original commit 12f7cb87679453fa96c796df857b7e7193d4ee09 was to fix tests. But cron should always return a valid host not localhost.
Diffstat (limited to 'lib/private/request.php')
-rwxr-xr-xlib/private/request.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/request.php b/lib/private/request.php
index 619eae3e9b5..5fd5b3a7197 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -95,7 +95,7 @@ class OC_Request {
* reverse proxies
*/
public static function serverHost() {
- if(OC::$CLI) {
+ if (OC::$CLI && defined('PHPUNIT_RUN')) {
return 'localhost';
}