Remove a bunch of old deprecated code
This commit is contained in:
parent
b05f6ddbe1
commit
f85d848649
|
@ -81,14 +81,7 @@ function findOutlets(collection, callback) {
|
|||
}
|
||||
}
|
||||
|
||||
const dashedName = outletName.replace(/_/g, '-');
|
||||
if (dashedName !== outletName) {
|
||||
Ember.warn("DEPRECATION: You need to use dashes in outlet names, not underscores");
|
||||
callback(dashedName, res, uniqueName);
|
||||
} else {
|
||||
callback(outletName, res, uniqueName);
|
||||
}
|
||||
|
||||
callback(outletName, res, uniqueName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import loadScript from 'discourse/lib/load-script';
|
||||
|
||||
export default {
|
||||
name: 'lab-deprecation',
|
||||
|
||||
initialize() {
|
||||
if (window.$LAB) { return; }
|
||||
|
||||
window.$LAB = {
|
||||
script(path) {
|
||||
Ember.warn('$LAB is not included with Discouse anymore. Use `loadScript` instead.');
|
||||
|
||||
const promise = loadScript(path);
|
||||
promise.wait = promise.then;
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
|
@ -11,14 +11,6 @@ export default {
|
|||
user = container.lookup('current-user:main'),
|
||||
siteSettings = container.lookup('site-settings:main');
|
||||
|
||||
const deprecatedBus = {};
|
||||
deprecatedBus.prototype = messageBus;
|
||||
deprecatedBus.subscribe = function() {
|
||||
Ember.warn("Discourse.MessageBus is deprecated. Use `this.messageBus` instead");
|
||||
messageBus.subscribe.apply(messageBus, Array.prototype.slice(arguments));
|
||||
};
|
||||
Discourse.MessageBus = deprecatedBus;
|
||||
|
||||
messageBus.alwaysLongPoll = Discourse.Environment === "development";
|
||||
messageBus.start();
|
||||
|
||||
|
|
|
@ -4,14 +4,6 @@ export default {
|
|||
name: 'sharing-sources',
|
||||
|
||||
initialize: function() {
|
||||
// Backwards compatibility
|
||||
Discourse.ShareLink = {};
|
||||
Discourse.ShareLink.addTarget = function(id, source) {
|
||||
Ember.warn('Discourse.ShareLink.addTarget is deprecated. Import `Sharing` and call `addSource` instead.');
|
||||
source.id = id;
|
||||
Sharing.addSource(source);
|
||||
};
|
||||
|
||||
Sharing.addSource({
|
||||
id: 'twitter',
|
||||
faIcon: 'fa-twitter-square',
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
export default function(name, opts) {
|
||||
opts = opts || {};
|
||||
|
||||
if (opts.__type) {
|
||||
Ember.warn("showModal now takes `opts` as a second param instead of a model");
|
||||
opts = {model: opts};
|
||||
}
|
||||
|
||||
const container = Discourse.__container__;
|
||||
|
||||
// We use the container here because modals are like singletons
|
||||
|
|
|
@ -35,11 +35,8 @@ Discourse.Ajax = Em.Mixin.create({
|
|||
args = arguments[1];
|
||||
}
|
||||
|
||||
if (args.success) {
|
||||
throw "Discourse.ajax should use promises, received 'success' callback";
|
||||
}
|
||||
if (args.error) {
|
||||
throw "DEPRECATION: Discourse.ajax should use promises, received 'error' callback";
|
||||
if (args.success || args.error) {
|
||||
throw "Discourse.ajax should use promises";
|
||||
}
|
||||
|
||||
var performAjax = function(resolve, reject) {
|
||||
|
|
|
@ -135,11 +135,6 @@ TopicList.reopenClass({
|
|||
return store.findFiltered('topicList', {filter, params});
|
||||
},
|
||||
|
||||
list(filter) {
|
||||
Ember.warn('`Discourse.TopicList.list` is deprecated. Use the store instead');
|
||||
return this.find(filter);
|
||||
},
|
||||
|
||||
// hide the category when it has no children
|
||||
hideUniformCategory(list, category) {
|
||||
list.set('hideCategory', category && !category.get("has_children"));
|
||||
|
|
Loading…
Reference in New Issue