From a3893e66dda5ea34514f27cf915be2be7d33edc7 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Fri, 10 Jul 2015 10:57:09 -0400 Subject: [PATCH] fix title of blog not updating after setup closes #5545 - updates config with new blogTitle after setup is finished --- core/client/app/controllers/setup/two.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/client/app/controllers/setup/two.js b/core/client/app/controllers/setup/two.js index 1252f8c049..8a90572f01 100644 --- a/core/client/app/controllers/setup/two.js +++ b/core/client/app/controllers/setup/two.js @@ -14,6 +14,7 @@ export default Ember.Controller.extend(ValidationEngine, { ghostPaths: Ember.inject.service('ghost-paths'), notifications: Ember.inject.service(), application: Ember.inject.controller(), + config: Ember.inject.service(), // ValidationEngine settings validationType: 'setup', @@ -48,7 +49,8 @@ export default Ember.Controller.extend(ValidationEngine, { setup: function () { var self = this, data = self.getProperties('blogTitle', 'name', 'email', 'password', 'image'), - notifications = this.get('notifications'); + notifications = this.get('notifications'), + config = this.get('config'); this.toggleProperty('submitting'); this.validate().then(function () { @@ -65,6 +67,7 @@ export default Ember.Controller.extend(ValidationEngine, { }] } }).then(function (result) { + config.set('blogTitle', data.blogTitle); // Don't call the success handler, otherwise we will be redirected to admin self.get('application').set('skipAuthSuccessHandler', true);