@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | if (!$this->container->getRequest()->isPost()) { |
| 29 | 29 | throw new \Core\JsonException('Call is not post'); |
| 30 | 30 | } |
| 31 | - $state = (bool)($this->request->getData("state") === 'true'); |
|
| 32 | - $postId = (int)$this->request->getData("postId"); |
|
| 31 | + $state = (bool) ($this->request->getData("state") === 'true'); |
|
| 32 | + $postId = (int) $this->request->getData("postId"); |
|
| 33 | 33 | |
| 34 | 34 | $result = array(); |
| 35 | 35 | $result["success"] = $this->postModule->setPublished(!$state, $postId); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | throw new \Core\JsonException('Call is not post'); |
| 50 | 50 | } |
| 51 | 51 | $state = ($this->request->getData("state") === 'true'); |
| 52 | - $postId = (int)$this->request->getData("postId"); |
|
| 52 | + $postId = (int) $this->request->getData("postId"); |
|
| 53 | 53 | |
| 54 | 54 | $result = array(); |
| 55 | 55 | $result["success"] = $this->postModule->setOnFrontPage(!$state, $postId); |
@@ -36,9 +36,11 @@ |
||
| 36 | 36 | |
| 37 | 37 | $data = $postModel->isPostSlugUnique($postSlug); |
| 38 | 38 | |
| 39 | - if ($data === false) //slug is not unique, but could be from the same post |
|
| 39 | + if ($data === false) { |
|
| 40 | + //slug is not unique, but could be from the same post |
|
| 40 | 41 | { |
| 41 | 42 | $slugOfId = $postModel->getPostSlugFromId($postId); |
| 43 | + } |
|
| 42 | 44 | if ($slugOfId === $postSlug) { |
| 43 | 45 | //it's the same post, return true |
| 44 | 46 | $data = true; |