* @param {string} [tabId] optional tab id to select
*/
showDetailsView: function(fileName, tabId) {
- console.debug('showDetailsView is deprecated! Use OCA.Files.Sidebar.activeTab. It will be removed in nextcloud 20.');
+ OC.debug && 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);
* Register a tab view to be added to all views
*/
registerTabView: function(tabView) {
- console.debug('registerTabView is deprecated! It will be removed in nextcloud 20.');
+ OC.debug && 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({
* Register a detail view to be added to all views
*/
registerDetailView: function(detailView) {
- console.debug('registerDetailView is deprecated! It will be removed in nextcloud 20.');
+ OC.debug && console.debug('registerDetailView is deprecated! It will be removed in nextcloud 20.');
if (detailView.el) {
OCA.Files.Sidebar.registerSecondaryView(detailView)
}
* @deprecated used OCA.Files.FileList.generatePreviewUrl instead
*/
generatePreviewUrl: function(urlSpec) {
- console.debug('DEPRECATED: please use generatePreviewUrl() from an OCA.Files.FileList instance');
+ OC.debug && console.debug('DEPRECATED: please use generatePreviewUrl() from an OCA.Files.FileList instance');
return OCA.Files.App.fileList.generatePreviewUrl(urlSpec);
},
* @deprecated used OCA.Files.FileList.lazyLoadPreview instead
*/
lazyLoadPreview : function(path, mime, ready, width, height, etag) {
- console.debug('DEPRECATED: please use lazyLoadPreview() from an OCA.Files.FileList instance');
+ OC.debug && console.debug('DEPRECATED: please use lazyLoadPreview() from an OCA.Files.FileList instance');
return FileList.lazyLoadPreview({
path: path,
mime: mime,
* @return {boolean}
*/
registerAction(action) {
- console.debug('OCA.Sharing.ExternalLinkActions is deprecated, use OCA.Sharing.ExternalShareAction instead')
+ OC.debug && 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)
* @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()
}
*/
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)
*/
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) {
* @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')
}
}
const warnIfNotTesting = function() {
if (window.TESTING === undefined) {
- console.debug.apply(console, arguments)
+ OC.debug && console.debug.apply(console, arguments)
}
}
}
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)
}