diff options
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') |