mirror of
https://github.com/nextcloud/server.git
synced 2026-03-22 18:33:46 -04:00
Merge pull request #38980 from nextcloud/backort/38852/stable27
[stable27] Move deprecation warnings to debug
This commit is contained in:
commit
8880e387ad
19 changed files with 29 additions and 29 deletions
|
|
@ -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.');
|
||||
OC.debug && console.warn('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.');
|
||||
OC.debug && console.warn('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.');
|
||||
OC.debug && console.warn('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');
|
||||
OC.debug && console.warn('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');
|
||||
OC.debug && console.warn('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')
|
||||
OC.debug && console.warn('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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
core/src/jquery/placeholder.js
vendored
2
core/src/jquery/placeholder.js
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
4
dist/core-install.js
vendored
4
dist/core-install.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-install.js.map
vendored
2
dist/core-install.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-login.js
vendored
4
dist/core-login.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-login.js.map
vendored
2
dist/core-login.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-main.js
vendored
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue