@@ -174,10 +174,12 @@ |
||
| 174 | 174 | $this->alertBox->setAlert("empty slug not allowed", "error"); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - if ($postSlug != $originalPostSlug) //if the slug has been updated |
|
| 177 | + if ($postSlug != $originalPostSlug) { |
|
| 178 | + //if the slug has been updated |
|
| 178 | 179 | { |
| 179 | 180 | if (!$slugModel->isUnique($postSlug, "posts", "posts_slug")) { |
| 180 | 181 | $error = true; |
| 182 | + } |
|
| 181 | 183 | $originalPostSlug = $slugModel->getSlugFromId($postId, "posts", "idposts", "posts_slug"); |
| 182 | 184 | $this->alertBox->setAlert("Slug not unique", "error"); |
| 183 | 185 | } |