Move deprecation warnings to debug

Signed-off-by: Simon L <szaimen@e.mail.de>
pull/38852/head
Simon L 3 years ago committed by John Molakvoæ
parent 99cbf778f3
commit 1afc82327a
  1. 6
      apps/files/js/filelist.js
  2. 4
      apps/files/js/files.js
  3. 2
      apps/files_sharing/src/services/ExternalLinkActions.js
  4. 2
      core/src/OC/capabilities.js
  5. 4
      core/src/OC/util.js
  6. 2
      core/src/OCA/search.js
  7. 2
      core/src/globals.js
  8. 2
      core/src/jquery/placeholder.js

@ -666,7 +666,7 @@
* @param {string} [tabId] optional tab id to select
*/
showDetailsView: function(fileName, tabId) {
console.warn('showDetailsView is deprecated! Use OCA.Files.Sidebar.activeTab. It will be removed in nextcloud 20.');
console.debug('showDetailsView is deprecated! Use OCA.Files.Sidebar.activeTab. It will be removed in nextcloud 20.');
this._updateDetailsView(fileName);
if (tabId) {
OCA.Files.Sidebar.setActiveTab(tabId);
@ -3879,7 +3879,7 @@
* Register a tab view to be added to all views
*/
registerTabView: function(tabView) {
console.warn('registerTabView is deprecated! It will be removed in nextcloud 20.');
console.debug('registerTabView is deprecated! It will be removed in nextcloud 20.');
const enabled = tabView.canDisplay || undefined
if (tabView.id) {
OCA.Files.Sidebar.registerTab(new OCA.Files.Sidebar.Tab({
@ -3905,7 +3905,7 @@
* Register a detail view to be added to all views
*/
registerDetailView: function(detailView) {
console.warn('registerDetailView is deprecated! It will be removed in nextcloud 20.');
console.debug('registerDetailView is deprecated! It will be removed in nextcloud 20.');
if (detailView.el) {
OCA.Files.Sidebar.registerSecondaryView(detailView)
}

@ -281,7 +281,7 @@
* @deprecated used OCA.Files.FileList.generatePreviewUrl instead
*/
generatePreviewUrl: function(urlSpec) {
console.warn('DEPRECATED: please use generatePreviewUrl() from an OCA.Files.FileList instance');
console.debug('DEPRECATED: please use generatePreviewUrl() from an OCA.Files.FileList instance');
return OCA.Files.App.fileList.generatePreviewUrl(urlSpec);
},
@ -290,7 +290,7 @@
* @deprecated used OCA.Files.FileList.lazyLoadPreview instead
*/
lazyLoadPreview : function(path, mime, ready, width, height, etag) {
console.warn('DEPRECATED: please use lazyLoadPreview() from an OCA.Files.FileList instance');
console.debug('DEPRECATED: please use lazyLoadPreview() from an OCA.Files.FileList instance');
return FileList.lazyLoadPreview({
path: path,
mime: mime,

@ -52,7 +52,7 @@ export default class ExternalLinkActions {
* @return {boolean}
*/
registerAction(action) {
console.warn('OCA.Sharing.ExternalLinkActions is deprecated, use OCA.Sharing.ExternalShareAction instead')
console.debug('OCA.Sharing.ExternalLinkActions is deprecated, use OCA.Sharing.ExternalShareAction instead')
if (typeof action === 'object' && action.icon && action.name && action.url) {
this._state.actions.push(action)

@ -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')
console.debug('OC.getCapabilities is deprecated and will be removed in Nextcloud 21. See @nextcloud/capabilities')
return realGetCapabilities()
}

@ -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')
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.warn('OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment')
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) {

@ -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')
console.debug('OCA.Search is deprecated. Please use the unified search API instead')
}
}

@ -56,7 +56,7 @@ import { getToken as getRequestToken } from './OC/requesttoken.js'
const warnIfNotTesting = function() {
if (window.TESTING === undefined) {
console.warn.apply(console, arguments)
console.debug.apply(console, arguments)
}
}

@ -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.')
console.debug('String.prototype.toRgb is deprecated! It will be removed in Nextcloud 22.')
return toRgb(this)
}

Loading…
Cancel
Save