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