@@ -196,10 +196,12 @@ |
||
| 196 | 196 | $this->alertBox->setAlert("empty slug not allowed", "error"); |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - if ($postSlug != $originalPostSlug) //if the slug has been updated |
|
| 199 | + if ($postSlug != $originalPostSlug) { |
|
| 200 | + //if the slug has been updated |
|
| 200 | 201 | { |
| 201 | 202 | if (!$this->slugModel->isUnique($postSlug, "posts", "posts_slug")) { |
| 202 | 203 | $error = true; |
| 204 | + } |
|
| 203 | 205 | $originalPostSlug = $this->slugModel->getSlugFromId($postId, "posts", "idposts", "posts_slug"); |
| 204 | 206 | $this->alertBox->setAlert("Slug not unique", "error"); |
| 205 | 207 | } |