Merge pull request #3138 from techAPJ/patch-1

Minor code optimization
This commit is contained in:
Robin Ward 2015-01-27 13:25:13 -05:00
commit c7fa4a029d
1 changed files with 4 additions and 4 deletions

View File

@ -35,19 +35,19 @@ export default ObjectController.extend(CanCheckEmails, {
canEditName: Discourse.computed.setting('enable_names'), canEditName: Discourse.computed.setting('enable_names'),
canSelectTitle: function() { canSelectTitle: function() {
return Discourse.SiteSettings.enable_badges && this.get('model.has_title_badges'); return this.siteSettings.enable_badges && this.get('model.has_title_badges');
}.property('model.badge_count'), }.property('model.badge_count'),
canChangePassword: function() { canChangePassword: function() {
return !Discourse.SiteSettings.enable_sso && Discourse.SiteSettings.enable_local_logins; return !this.siteSettings.enable_sso && this.siteSettings.enable_local_logins;
}.property(), }.property(),
canReceiveDigest: function() { canReceiveDigest: function() {
return !this.siteSettings.disable_digest_emails return !this.siteSettings.disable_digest_emails;
}.property(), }.property(),
availableLocales: function() { availableLocales: function() {
return Discourse.SiteSettings.available_locales.split('|').map( function(s) { return this.siteSettings.available_locales.split('|').map( function(s) {
return {name: s, value: s}; return {name: s, value: s};
}); });
}.property(), }.property(),