summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-08-19 14:47:36 +0200
committerGitHub <noreply@github.com>2021-08-19 14:47:36 +0200
commitcae51a0a25d6fffb81f11f33cd8452410961f1a2 (patch)
treeb46774024782232bceb16df8bee4442697a7cc8a /lib
parente2a4dc818cce9d1cf05c3bb354b844f0d74dfb8d (diff)
parent55fcffd11a02c3c9c75923e7912ee952bf348cab (diff)
downloadnextcloud-server-cae51a0a25d6fffb81f11f33cd8452410961f1a2.tar.gz
nextcloud-server-cae51a0a25d6fffb81f11f33cd8452410961f1a2.zip
Merge pull request #28454 from nextcloud/backport/28303/stable22
Diffstat (limited to 'lib')
-rw-r--r--lib/private/URLGenerator.php7
-rw-r--r--lib/public/IURLGenerator.php6
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 34bb65cd0e6..f7fa6fa5632 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -276,4 +276,11 @@ class URLGenerator implements IURLGenerator {
}
return $this->baseUrl;
}
+
+ /**
+ * @return string webroot part of the base url
+ */
+ public function getWebroot(): string {
+ return \OC::$WEBROOT;
+ }
}
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php
index 486ca47d252..9f1a6447eb4 100644
--- a/lib/public/IURLGenerator.php
+++ b/lib/public/IURLGenerator.php
@@ -102,4 +102,10 @@ interface IURLGenerator {
* @since 13.0.0
*/
public function getBaseUrl(): string;
+
+ /**
+ * @return string webroot part of the base url
+ * @since 23.0.0
+ */
+ public function getWebroot(): string;
}