Passed
Push — RefactoringPosts ( 744e11...92981d )
by Stone
01:58
created
App/Controllers/Admin/Post.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,10 +211,12 @@
 block discarded – undo
211 211
             $this->alertBox->setAlert("empty slug not allowed", "error");
212 212
         }
213 213
 
214
-        if ($postSlug != $originalPostSlug) //if the slug has been updated
214
+        if ($postSlug != $originalPostSlug) {
215
+            //if the slug has been updated
215 216
         {
216 217
             if (!$this->postModel->isPostSlugUnique($postSlug)) {
217 218
                 $error = true;
219
+        }
218 220
                 $originalPostSlug = $this->postModel->getPostSlugFromId($postId);
219 221
                 $this->alertBox->setAlert("Slug not unique", "error");
220 222
             }
Please login to merge, or discard this patch.
App/Controllers/Ajax/PostVerification.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,9 +37,11 @@
 block discarded – undo
37 37
 
38 38
         $data = $postModel->isPostSlugUnique($postSlug);
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 = $postModel->getPostSlugFromId($postId);
44
+        }
43 45
             if($slugOfId === $postSlug)
44 46
             {
45 47
                 //it's the same post, return true
Please login to merge, or discard this patch.