TryGhost/Ghost — pull request #2968 by jaswilli (2014-06-16 01:21:38+00:00)
Title: Fix slug create and update logic for posts

Slug handling for posts is still not quite right.

* Unneeded slug API calls being made on the Content and Editor screens.
* The title -> slug observer is running all the time when it should only be used on new (never saved) posts.
* It's possible to end up with a new incremented slug (-number) when the original should be used.

**Changes:**

* Remove unnecessary calls to the slug endpoint when loading posts on the Content screen.
* Remove unnecessary calls to the slug endpoint after saving a post in the Editor screen.
* Only run the title to slug observer when the post is being created.
* Improved logic for when to update the slug and and also cases where the existing slug should be used.