@@ -41,8 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | if ($showAll) { |
| 43 | 43 | $statement = $database->prepare('SELECT * FROM comment WHERE request = :target;'); |
| 44 | - } |
|
| 45 | - else { |
|
| 44 | + } else { |
|
| 46 | 45 | $statement = $database->prepare(<<<SQL |
| 47 | 46 | SELECT * FROM comment |
| 48 | 47 | WHERE request = :target AND (visibility = 'user' OR visibility = 'requester' OR user = :userid); |
@@ -84,12 +83,10 @@ discard block |
||
| 84 | 83 | |
| 85 | 84 | if ($statement->execute()) { |
| 86 | 85 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 87 | - } |
|
| 88 | - else { |
|
| 86 | + } else { |
|
| 89 | 87 | throw new Exception($statement->errorInfo()); |
| 90 | 88 | } |
| 91 | - } |
|
| 92 | - else { |
|
| 89 | + } else { |
|
| 93 | 90 | // update |
| 94 | 91 | $statement = $this->dbObject->prepare(<<<SQL |
| 95 | 92 | UPDATE comment |
@@ -59,12 +59,10 @@ |
||
| 59 | 59 | // actually save the request to the database |
| 60 | 60 | if ($this->getSiteConfiguration()->getEmailConfirmationEnabled()) { |
| 61 | 61 | $this->saveAsEmailConfirmation($request, $comment); |
| 62 | - } |
|
| 63 | - else { |
|
| 62 | + } else { |
|
| 64 | 63 | $this->saveWithoutEmailConfirmation($request, $comment); |
| 65 | 64 | } |
| 66 | - } |
|
| 67 | - else { |
|
| 65 | + } else { |
|
| 68 | 66 | // set the form values from the session context |
| 69 | 67 | $context = WebRequest::getSessionContext('accountReq'); |
| 70 | 68 | if ($context !== null && is_array($context)) { |
@@ -99,8 +99,7 @@ discard block |
||
| 99 | 99 | $this->setTemplate('view-request/main-with-checkuser-data.tpl'); |
| 100 | 100 | $this->setupCheckUserData($request); |
| 101 | 101 | } |
| 102 | - } |
|
| 103 | - else { |
|
| 102 | + } else { |
|
| 104 | 103 | $this->setTemplate('view-request/main.tpl'); |
| 105 | 104 | } |
| 106 | 105 | } |
@@ -114,8 +113,7 @@ discard block |
||
| 114 | 113 | if ($request->getStatus() === 'Closed') { |
| 115 | 114 | if ($request->getWasCreated()) { |
| 116 | 115 | $statusSymbol = self::STATUS_SYMBOL_ACCEPTED; |
| 117 | - } |
|
| 118 | - else { |
|
| 116 | + } else { |
|
| 119 | 117 | $statusSymbol = self::STATUS_SYMBOL_REJECTED; |
| 120 | 118 | } |
| 121 | 119 | } |