Skip to content

Commit 319a649

Browse files
susnuxicewind1991
authored andcommitted
chore: remove deprecated global aliases for OC functions
Those aliases were deprecated since Nextcloud 17 and scheduled for removal since Nextcloud 20. No app uses them except `oc_requesttoken` for which I reported this: - nextcloud/passman#869 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent f84fe75 commit 319a649

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

core/src/globals.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @nextcloud/no-deprecated-globals */
21
/*!
32
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
43
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -10,7 +9,6 @@ import moment from 'moment'
109
import _ from 'underscore'
1110
import { initCore } from './init.js'
1211
import OC from './OC/index.js'
13-
import { getRequestToken } from './OC/requesttoken.ts'
1412
import OCA from './OCA/index.js'
1513
import OCP from './OCP/index.js'
1614

@@ -55,15 +53,6 @@ setDeprecatedProp('moment', () => moment, 'please ship your own, this will be re
5553

5654
window.OC = OC
5755
setDeprecatedProp('initCore', () => initCore, 'this is an internal function')
58-
setDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead, this will be removed in Nextcloud 20')
59-
setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead, this will be removed in Nextcloud 20')
60-
setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20')
61-
setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead, this will be removed in Nextcloud 20')
62-
setDeprecatedProp('oc_defaults', () => OC.theme, 'use OC.theme instead, this will be removed in Nextcloud 20')
63-
setDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead, this will be removed in Nextcloud 20')
64-
setDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead, this will be removed in Nextcloud 20')
65-
setDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead, this will be removed in Nextcloud 20')
66-
setDeprecatedProp('OCDialogs', () => OC.dialogs, 'use OC.dialogs instead, this will be removed in Nextcloud 20')
6756
window.OCP = OCP
6857
window.OCA = OCA
6958

0 commit comments

Comments
 (0)