summaryrefslogtreecommitdiffstats
path: root/core/src/OC
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-06-24 17:45:00 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-06-24 16:25:58 +0000
commitff40cd7563192ef3c1389c9f093487099da2c09f (patch)
treec7f9d69d21d200e96fe4045c353a2fe2d10424e3 /core/src/OC
parent4f666927bdfeb49791238b7c4b9fe191d709576e (diff)
downloadnextcloud-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/src/OC')
-rw-r--r--core/src/OC/appsettings.js2
-rw-r--r--core/src/OC/capabilities.js2
-rw-r--r--core/src/OC/legacy-loader.js4
-rw-r--r--core/src/OC/util.js4
4 files changed, 6 insertions, 6 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) {