@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | { |
25 | 25 | $this->onlyAdmin(); |
26 | 26 | $this->onlyPost(); |
27 | - $state = (bool)($this->request->getData("state") === 'true'); |
|
28 | - $commentId = (int)$this->request->getData("commentId"); |
|
27 | + $state = (bool) ($this->request->getData("state") === 'true'); |
|
28 | + $commentId = (int) $this->request->getData("commentId"); |
|
29 | 29 | |
30 | 30 | $result = array(); |
31 | 31 | $result["success"] = $this->commentModel->setApproved(!$state, $commentId); |
@@ -36,16 +36,16 @@ discard block |
||
36 | 36 | |
37 | 37 | public function loadComments() |
38 | 38 | { |
39 | - $commentOffset = (int)$this->request->getData("commentOffset"); |
|
40 | - $postId = (int)$this->request->getData("postId"); |
|
39 | + $commentOffset = (int) $this->request->getData("commentOffset"); |
|
40 | + $postId = (int) $this->request->getData("postId"); |
|
41 | 41 | |
42 | 42 | $result = array(); |
43 | - $result["success"]=false; |
|
43 | + $result["success"] = false; |
|
44 | 44 | |
45 | 45 | $data["comments"] = $this->commentModel->getCommentsListOnPost($postId, $commentOffset); |
46 | - if($data["comments"]) |
|
46 | + if ($data["comments"]) |
|
47 | 47 | { |
48 | - $result["success"]=true; |
|
48 | + $result["success"] = true; |
|
49 | 49 | $twig = $this->container->getTemplate(); |
50 | 50 | $html = $twig->render('Includes/LoadComments.twig', $data); |
51 | 51 |
@@ -24,13 +24,13 @@ |
||
24 | 24 | const LIST_PER_PAGE = 10; |
25 | 25 | const COMMENTS_PER_PAGE = 2; |
26 | 26 | |
27 | - const EXCERPT_WORD_COUNT =50; |
|
27 | + const EXCERPT_WORD_COUNT = 50; |
|
28 | 28 | |
29 | 29 | //login security |
30 | 30 | const NUMBER_OF_BAD_PASSWORD_TRIES = 3; |
31 | 31 | const LOCKOUT_MINUTES = 5; |
32 | 32 | |
33 | - const PASSWORD_RESET_DURATION = 240;//number of minutes the reset password link is valid |
|
33 | + const PASSWORD_RESET_DURATION = 240; //number of minutes the reset password link is valid |
|
34 | 34 | |
35 | 35 | const HASH_KEY = "1337blogOcPass159758348ShaQpiss"; |
36 | 36 | } |
37 | 37 | \ No newline at end of file |