summaryrefslogtreecommitdiffstats
path: root/lib/private/urlgenerator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/urlgenerator.php')
-rw-r--r--lib/private/urlgenerator.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php
index f5ec9803edb..e50e9eed6af 100644
--- a/lib/private/urlgenerator.php
+++ b/lib/private/urlgenerator.php
@@ -162,6 +162,10 @@ class URLGenerator implements IURLGenerator {
public function getAbsoluteURL($url) {
$separator = $url[0] === '/' ? '' : '/';
+ if (\OC::$CLI && !defined('PHPUNIT_RUN')) {
+ return rtrim($this->config->getSystemValue('overwrite.cli.url'), '/') . '/' . ltrim($url, '/');
+ }
+
// The ownCloud web root can already be prepended.
$webRoot = substr($url, 0, strlen(\OC::$WEBROOT)) === \OC::$WEBROOT
? ''