diff options
author | Simon L <szaimen@e.mail.de> | 2023-06-24 17:45:00 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-06-24 16:25:58 +0000 |
commit | ff40cd7563192ef3c1389c9f093487099da2c09f (patch) | |
tree | c7f9d69d21d200e96fe4045c353a2fe2d10424e3 /core | |
parent | 4f666927bdfeb49791238b7c4b9fe191d709576e (diff) | |
download | nextcloud-server-ff40cd7563192ef3c1389c9f093487099da2c09f.tar.gz nextcloud-server-ff40cd7563192ef3c1389c9f093487099da2c09f.zip |
Move deprecation warnings to debug
Signed-off-by: Simon L <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/OC/appsettings.js | 2 | ||||
-rw-r--r-- | core/src/OC/capabilities.js | 2 | ||||
-rw-r--r-- | core/src/OC/legacy-loader.js | 4 | ||||
-rw-r--r-- | core/src/OC/util.js | 4 | ||||
-rw-r--r-- | core/src/OCA/search.js | 2 | ||||
-rw-r--r-- | core/src/Polyfill/tooltip.js | 4 | ||||
-rw-r--r-- | core/src/globals.js | 2 | ||||
-rw-r--r-- | core/src/jquery/placeholder.js | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/core/src/OC/appsettings.js b/core/src/OC/appsettings.js index ee41b7c6f85..54eebe8e561 100644 --- a/core/src/OC/appsettings.js +++ b/core/src/OC/appsettings.js @@ -38,7 +38,7 @@ import { generateFilePath } from "@nextcloud/router" * @deprecated 17.0.0 this method is unused and will be removed with Nextcloud 18 */ export const appSettings = args => { - console.warn('OC.appSettings is deprecated and will be removed with Nextcloud 18') + OC.debug && console.warn('OC.appSettings is deprecated and will be removed with Nextcloud 18') if (typeof args === 'undefined' || typeof args.appid === 'undefined') { throw { diff --git a/core/src/OC/capabilities.js b/core/src/OC/capabilities.js index c7df9b4f3d1..72a71d7c743 100644 --- a/core/src/OC/capabilities.js +++ b/core/src/OC/capabilities.js @@ -32,6 +32,6 @@ import { getCapabilities as realGetCapabilities } from '@nextcloud/capabilities' * @since 14.0.0 */ export const getCapabilities = () => { - console.warn('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') + OC.debug && console.warn('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') return realGetCapabilities() } diff --git a/core/src/OC/legacy-loader.js b/core/src/OC/legacy-loader.js index e5bbac8f3a0..b214ac0de98 100644 --- a/core/src/OC/legacy-loader.js +++ b/core/src/OC/legacy-loader.js @@ -40,7 +40,7 @@ const loadedStyles = [] * @deprecated 16.0.0 Use OCP.Loader.loadScript */ export const addScript = (app, script, ready) => { - console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead') + OC.debug && console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead') let deferred const path = generateFilePath(app, 'js', script + '.js') @@ -64,7 +64,7 @@ export const addScript = (app, script, ready) => { * @deprecated 16.0.0 Use OCP.Loader.loadStylesheet */ export const addStyle = (app, style) => { - console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead') + OC.debug && console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead') const path = generateFilePath(app, 'css', style + '.css') if (loadedStyles.indexOf(path) === -1) { diff --git a/core/src/OC/util.js b/core/src/OC/util.js index 8a50808b5cb..f0dd7e0ac14 100644 --- a/core/src/OC/util.js +++ b/core/src/OC/util.js @@ -124,7 +124,7 @@ export default { */ formatDate(timestamp, format) { if (window.TESTING === undefined) { - console.warn('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') + OC.debug && console.warn('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') } format = format || 'LLL' return moment(timestamp).format(format) @@ -136,7 +136,7 @@ export default { */ relativeModifiedDate(timestamp) { if (window.TESTING === undefined) { - console.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') + OC.debug && console.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') } const diff = moment().diff(moment(timestamp)) if (diff >= 0 && diff < 45000) { diff --git a/core/src/OCA/search.js b/core/src/OCA/search.js index 10b629a0cf3..f0395c0bcd5 100644 --- a/core/src/OCA/search.js +++ b/core/src/OCA/search.js @@ -26,7 +26,7 @@ export default class Search { * @deprecated 20.0.0, will be removed in Nextcloud 22 */ constructor() { - console.warn('OCA.Search is deprecated. Please use the unified search API instead') + OC.debug && console.warn('OCA.Search is deprecated. Please use the unified search API instead') } } diff --git a/core/src/Polyfill/tooltip.js b/core/src/Polyfill/tooltip.js index 452cb30305b..925b67c3e8b 100644 --- a/core/src/Polyfill/tooltip.js +++ b/core/src/Polyfill/tooltip.js @@ -31,13 +31,13 @@ $.prototype.tooltip = (function(tooltip) { } catch (ex) { if (ex instanceof TypeError && config === 'destroy') { if (window.TESTING === undefined) { - console.error('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed') + OC.debug && console.warn('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed') } return tooltip.call(this, 'dispose') } if (ex instanceof TypeError && config === 'fixTitle') { if (window.TESTING === undefined) { - console.error('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed') + OC.debug && console.warn('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed') } return tooltip.call(this, '_fixTitle') } diff --git a/core/src/globals.js b/core/src/globals.js index 8d60bde6eb0..1a4c0582768 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -56,7 +56,7 @@ import { getToken as getRequestToken } from './OC/requesttoken.js' const warnIfNotTesting = function() { if (window.TESTING === undefined) { - console.warn.apply(console, arguments) + OC.debug && console.warn.apply(console, arguments) } } diff --git a/core/src/jquery/placeholder.js b/core/src/jquery/placeholder.js index 03647059131..9e24216a1b5 100644 --- a/core/src/jquery/placeholder.js +++ b/core/src/jquery/placeholder.js @@ -140,7 +140,7 @@ const toRgb = (s) => { } String.prototype.toRgb = function() { - console.warn('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.') + OC.debug && console.warn('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.') return toRgb(this) } |