summaryrefslogtreecommitdiffstats
path: root/core/src/OC
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-06-16 14:03:23 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-06-24 16:54:11 +0200
commit872483f279732908d60d1a85abedcc8fb79a625a (patch)
treeb8efe26dd07d335bc3e6f38db8a3da3bc4ed9e91 /core/src/OC
parent1afc82327aecbd372ddcd5bf8306bcb3722700ed (diff)
downloadnextcloud-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/src/OC')
-rw-r--r--core/src/OC/capabilities.js2
-rw-r--r--core/src/OC/util.js4
2 files changed, 3 insertions, 3 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) {