Merge pull request #2713 from jaswilli/startup-issues

Don't xmlrpc ping for the default Welcome to Ghost post
This commit is contained in:
Hannah Wolfe 2014-05-08 12:24:39 +01:00
commit d4a6eb26a4
2 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,7 @@ function hasActionsMap() {
return _.any(exported.actionsMap, function (val, key) {
/*jslint unparam:true*/
return Object.hasOwnProperty(key);
return Object.hasOwnProperty.call(exported.actionsMap, key);
});
}

View File

@ -20,6 +20,14 @@ function ping(post) {
return;
}
// Don't ping for the welcome to ghost post.
// This also handles the case where during ghost's first run
// models.init() inserts this post but permissions.init() hasn't
// (can't) run yet.
if (post.slug === 'welcome-to-ghost') {
return;
}
// Need to require here because of circular dependency
return config.urlForPost(require('./api').settings, post, true).then(function (url) {