mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Don't xmlrpc ping for the default Welcome to Ghost post
closes #2712 -prevents xmlrpc.ping from being run before Ghost is in a valid state -fix a call to Object.hasOwnProperty in permissions.hasActionsMap
This commit is contained in:
parent
bb543ede8e
commit
e078cc4085
2 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue