@@ -36,9 +36,11 @@ |
||
| 36 | 36 | |
| 37 | 37 | $data = $postModel->isPostSlugUnique($postSlug); |
| 38 | 38 | |
| 39 | - if ($data == false) //slug is not unique, but could be from the same post |
|
| 39 | + if ($data == false) { |
|
| 40 | + //slug is not unique, but could be from the same post |
|
| 40 | 41 | { |
| 41 | 42 | $slugOfId = $postModel->getPostSlugFromId($postId); |
| 43 | + } |
|
| 42 | 44 | if ($slugOfId === $postSlug) { |
| 43 | 45 | //it's the same post, return true |
| 44 | 46 | $data = true; |