diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-07 09:03:14 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-07 14:03:14 +0200 |
commit | acf0ca15414fa17ae5ccc2a7d123f83cf5a2192d (patch) | |
tree | d68fb69b753a47357df30a24458dbf3b0e932e7b /core/src | |
parent | 22f3306fd0d4f782ba415ef8220f077e293eb655 (diff) | |
download | nextcloud-server-acf0ca15414fa17ae5ccc2a7d123f83cf5a2192d.tar.gz nextcloud-server-acf0ca15414fa17ae5ccc2a7d123f83cf5a2192d.zip |
Move OC.appswebroots to the bundle and deprecate oc_appswebroots
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/appswebroots.js | 24 | ||||
-rw-r--r-- | core/src/OC/index.js | 2 | ||||
-rw-r--r-- | core/src/globals.js | 3 |
3 files changed, 29 insertions, 0 deletions
diff --git a/core/src/OC/appswebroots.js b/core/src/OC/appswebroots.js new file mode 100644 index 00000000000..f4a82384fe6 --- /dev/null +++ b/core/src/OC/appswebroots.js @@ -0,0 +1,24 @@ +/* + * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +const appswebroots = (window._oc_appswebroots !== undefined) ? window._oc_appswebroots : false + +export default appswebroots diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 548d6f544c8..345abdf5796 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -21,6 +21,7 @@ import Apps from './apps' import {AppConfig, appConfig} from './appconfig' +import appswebroots from './appswebroots' import Backbone from './backbone' import Config from './config' import ContactsMenu from './contactsmenu' @@ -53,6 +54,7 @@ export default { Apps, AppConfig, appConfig, + appswebroots, Backbone, ContactsMenu, config: Config, diff --git a/core/src/globals.js b/core/src/globals.js index bbe65009403..aa783ef815f 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -19,6 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +import appswebroots from "./OC/appswebroots"; + /** * * @param {Function} func the library to deprecate @@ -107,6 +109,7 @@ window['md5'] = md5 window['moment'] = moment window['OC'] = OC +setDeprecatedProp('oc_appswebroots', OC.appswebroots, 'use OC.appswebroots instead') setDeprecatedProp('oc_config', OC.config, 'use OC.config instead') setDeprecatedProp('oc_debug', OC.debug, 'use OC.debug instead') setDeprecatedProp('oc_isadmin', OC.isUserAdmin(), 'use OC.isUserAdmin() instead') |