Passed
Push — Showing-Posts ( d80634...b1a8d3 )
by Stone
03:49 queued 01:15
created
App/Controllers/Admin/Post.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,10 +174,12 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
 
125 125
         //checking result and redirecting
126 126
         if ($postId != null) {
127
-            $this->alertBox->setAlert("Post " . $title . " Created");
128
-            $this->container->getResponse()->redirect("admin/post/modify/" . $postSlug);
127
+            $this->alertBox->setAlert("Post ".$title." Created");
128
+            $this->container->getResponse()->redirect("admin/post/modify/".$postSlug);
129 129
         }
130
-        $this->alertBox->setAlert("Error creating " . $title, "error");
130
+        $this->alertBox->setAlert("Error creating ".$title, "error");
131 131
         $this->container->getResponse()->redirect("admin/post/new");
132 132
 
133 133
     }
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
 
207 207
         //checking result and redirecting
208 208
         if ($postUpdate) {
209
-            $this->alertBox->setAlert("Post " . $title . " Updated");
210
-            $this->container->getResponse()->redirect("admin/post/modify/" . $postSlug);
209
+            $this->alertBox->setAlert("Post ".$title." Updated");
210
+            $this->container->getResponse()->redirect("admin/post/modify/".$postSlug);
211 211
         }
212
-        $this->alertBox->setAlert("Error updating " . $title, "error");
213
-        $this->container->getResponse()->redirect("admin/post/modify/" . $originalPostSlug);
212
+        $this->alertBox->setAlert("Error updating ".$title, "error");
213
+        $this->container->getResponse()->redirect("admin/post/modify/".$originalPostSlug);
214 214
     }
215 215
 }
216 216
\ No newline at end of file
Please login to merge, or discard this patch.
Core/Constant.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,5 +22,5 @@
 block discarded – undo
22 22
     const FRONT_PAGE_POSTS = 3;
23 23
     const POSTS_PER_PAGE = 10;
24 24
 
25
-    const EXCERPT_WORD_COUNT =50;
25
+    const EXCERPT_WORD_COUNT = 50;
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.