diff options
author | Simon L <szaimen@e.mail.de> | 2023-06-16 14:03:23 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2023-06-24 16:54:11 +0200 |
commit | 872483f279732908d60d1a85abedcc8fb79a625a (patch) | |
tree | b8efe26dd07d335bc3e6f38db8a3da3bc4ed9e91 /core | |
parent | 1afc82327aecbd372ddcd5bf8306bcb3722700ed (diff) | |
download | nextcloud-server-872483f279732908d60d1a85abedcc8fb79a625a.tar.gz nextcloud-server-872483f279732908d60d1a85abedcc8fb79a625a.zip |
only print deprecation logs if debug mode is enabled
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/OC/capabilities.js | 2 | ||||
-rw-r--r-- | core/src/OC/util.js | 4 | ||||
-rw-r--r-- | core/src/OCA/search.js | 2 | ||||
-rw-r--r-- | core/src/globals.js | 2 | ||||
-rw-r--r-- | core/src/jquery/placeholder.js | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/core/src/OC/capabilities.js b/core/src/OC/capabilities.js index fffed92dede..8fc21abf369 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.debug('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') + OC.debug && console.debug('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities') return realGetCapabilities() } diff --git a/core/src/OC/util.js b/core/src/OC/util.js index db6b0eccae0..42ac73ef07d 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.debug('OC.Util.formatDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') + OC.debug && console.debug('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.debug('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment') + OC.debug && console.debug('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 e206e04f4b7..81a86a04247 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.debug('OCA.Search is deprecated. Please use the unified search API instead') + OC.debug && console.debug('OCA.Search is deprecated. Please use the unified search API instead') } } diff --git a/core/src/globals.js b/core/src/globals.js index dcad2bcdbf6..61ad3921999 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.debug.apply(console, arguments) + OC.debug && console.debug.apply(console, arguments) } } diff --git a/core/src/jquery/placeholder.js b/core/src/jquery/placeholder.js index d91c94c18ac..b77692fdf39 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.debug('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.') + OC.debug && console.debug('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.') return toRgb(this) } |