Passed
Push — Showing-Posts ( c030ab...80516c )
by Stone
02:14
created
App/Controllers/Ajax/PostVerification.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $postId = $this->request->getData("postId");
28 28
 
29 29
         $data = false;
30
-        if(!$this->isAlphaNum($postSlug))
30
+        if (!$this->isAlphaNum($postSlug))
31 31
         {
32 32
             echo json_encode($data);
33 33
             return;
@@ -37,10 +37,10 @@  discard block
 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) //slug is not unique, but could be from the same post
41 41
         {
42
-            $slugOfId = $slugModel->getSlugFromId($postId, "posts", "idposts","posts_slug");
43
-            if($slugOfId === $postSlug)
42
+            $slugOfId = $slugModel->getSlugFromId($postId, "posts", "idposts", "posts_slug");
43
+            if ($slugOfId === $postSlug)
44 44
             {
45 45
                 //it's the same post, return true
46 46
                 $data = true;
Please login to merge, or discard this 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.