@@ -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 | } |
@@ -25,9 +25,9 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | return array( |
28 | - "pageNo" => $pageNo, |
|
29 | - "offset" => $offset, |
|
30 | - "totalPages" => $totalPages |
|
28 | + "pageNo" => $pageNo, |
|
29 | + "offset" => $offset, |
|
30 | + "totalPages" => $totalPages |
|
31 | 31 | ); |
32 | 32 | |
33 | 33 | } |