Passed
Push — Showing-Posts ( 9bf220...f78be0 )
by Stone
01:51
created
App/Controllers/Admin/Post.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,10 +196,12 @@
 block discarded – undo
196 196
             $this->alertBox->setAlert("empty slug not allowed", "error");
197 197
         }
198 198
 
199
-        if ($postSlug != $originalPostSlug) //if the slug has been updated
199
+        if ($postSlug != $originalPostSlug) {
200
+            //if the slug has been updated
200 201
         {
201 202
             if (!$this->slugModel->isUnique($postSlug, "posts", "posts_slug")) {
202 203
                 $error = true;
204
+        }
203 205
                 $originalPostSlug = $this->slugModel->getSlugFromId($postId, "posts", "idposts", "posts_slug");
204 206
                 $this->alertBox->setAlert("Slug not unique", "error");
205 207
             }
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 = $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
Please login to merge, or discard this patch.