summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-04-29 18:51:45 +0200
committerMorris Jobke <hey@morrisjobke.de>2019-05-06 10:12:47 +0200
commit6095ef223562fdf8956663a90d58aa35593c68e0 (patch)
treec8e4ecf5adc8452cf9308bdf333da4c805deb11a /core/src
parent0877a2e6274ed233eb8773099bceaa32b870195f (diff)
downloadnextcloud-server-6095ef223562fdf8956663a90d58aa35593c68e0.tar.gz
nextcloud-server-6095ef223562fdf8956663a90d58aa35593c68e0.zip
Move oc_debug to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/debug.js24
-rw-r--r--core/src/OC/index.js2
-rw-r--r--core/src/globals.js1
3 files changed, 27 insertions, 0 deletions
diff --git a/core/src/OC/debug.js b/core/src/OC/debug.js
new file mode 100644
index 00000000000..15a66c44aed
--- /dev/null
+++ b/core/src/OC/debug.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 base = window._oc_debug
+
+export const debug = base
diff --git a/core/src/OC/index.js b/core/src/OC/index.js
index dd618e7a1a0..ff7b3c2503d 100644
--- a/core/src/OC/index.js
+++ b/core/src/OC/index.js
@@ -42,6 +42,7 @@ import PasswordConfirmation from './password-confirmation'
import Plugins from './plugins'
import search from './search'
import Util from './util'
+import {debug} from './debug'
import {redirect, reload} from './navigation'
/** @namespace OC */
@@ -61,6 +62,7 @@ export default {
Plugins,
search,
Util,
+ debug,
generateUrl,
filePath,
redirect,
diff --git a/core/src/globals.js b/core/src/globals.js
index 9fcf03ba9ee..01a7f3452ef 100644
--- a/core/src/globals.js
+++ b/core/src/globals.js
@@ -109,6 +109,7 @@ window['moment'] = moment
window['OC'] = OC
setDeprecatedProp('oc_config', OC.config, 'use OC.config instead')
setDeprecatedProp('oc_isadmin', OC.isUserAdmin(), 'use OC.isUserAdmin() instead')
+setDeprecatedProp('oc_debug', OC.debug, 'use OC.debug instead')
setDeprecatedProp('OCDialogs', OC.dialogs, 'use OC.dialogs instead')
window['OCP'] = OCP
window['OCA'] = OCA