Skip to content

Commit 768b856

Browse files
authored
Merge pull request #1050 from nextcloud/fix/backport-1049
[stable27] fix: invalid merge on backport
2 parents 05f0e6b + ccff67d commit 768b856

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/AppInfo/Application.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,9 @@ public function boot(IBootContext $context): void {
9393
}
9494

9595
public function registerFrontend(IRequest $request, IConfig $config, IUserSession $userSession): void {
96-
if (!\OC::$CLI) {
97-
if ($userSession->getUser() instanceof IUser
98-
&& strpos($request->getPathInfo(), '/s/') !== 0
99-
&& strpos($request->getPathInfo(), '/login/') !== 0
100-
&& substr($request->getScriptName(), 0 - strlen('/index.php')) === '/index.php') {
101-
Util::addScript('terms_of_service', 'terms_of_service-user');
102-
} else if ($config->getAppValue(self::APPNAME, 'tos_on_public_shares', '0') === '1') {
103-
Util::addScript('terms_of_service', 'terms_of_service-public');
104-
}
96+
// Ignore CLI
97+
if (\OC::$CLI) {
98+
return;
10599
}
106100

107101
// Skip login-related pages

0 commit comments

Comments
 (0)