@@ -408,7 +408,7 @@ |
||
| 408 | 408 | . '|' . $this->forwardedip // } private data not known to those without access |
| 409 | 409 | . '|' . $this->useragent // } |
| 410 | 410 | . '|' . $this->email // } |
| 411 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
| 411 | + . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
| 412 | 412 | |
| 413 | 413 | return hash('sha256', $data); |
| 414 | 414 | } |
@@ -67,12 +67,10 @@ |
||
| 67 | 67 | |
| 68 | 68 | if ($statement->execute()) { |
| 69 | 69 | $this->id = (int)$this->dbObject->lastInsertId(); |
| 70 | - } |
|
| 71 | - else { |
|
| 70 | + } else { |
|
| 72 | 71 | throw new Exception($statement->errorInfo()); |
| 73 | 72 | } |
| 74 | - } |
|
| 75 | - else { |
|
| 73 | + } else { |
|
| 76 | 74 | // update |
| 77 | 75 | $statement = $this->dbObject->prepare(<<<SQL |
| 78 | 76 | UPDATE `request` SET |
@@ -74,8 +74,7 @@ |
||
| 74 | 74 | SessionAlert::success("Comment has been saved successfully"); |
| 75 | 75 | |
| 76 | 76 | $this->redirect('viewRequest', null, array('id' => $comment->getRequest())); |
| 77 | - } |
|
| 78 | - else { |
|
| 77 | + } else { |
|
| 79 | 78 | $this->assignCSRFToken(); |
| 80 | 79 | $this->assign('comment', $comment); |
| 81 | 80 | $this->assign('request', $request); |
@@ -94,8 +94,7 @@ discard block |
||
| 94 | 94 | $this->setTemplate('view-request/main-with-checkuser-data.tpl'); |
| 95 | 95 | $this->setupCheckUserData($request); |
| 96 | 96 | } |
| 97 | - } |
|
| 98 | - else { |
|
| 97 | + } else { |
|
| 99 | 98 | $this->setTemplate('view-request/main.tpl'); |
| 100 | 99 | } |
| 101 | 100 | } |
@@ -109,8 +108,7 @@ discard block |
||
| 109 | 108 | if ($request->getStatus() === 'Closed') { |
| 110 | 109 | if ($request->getWasCreated()) { |
| 111 | 110 | $statusSymbol = self::STATUS_SYMBOL_ACCEPTED; |
| 112 | - } |
|
| 113 | - else { |
|
| 111 | + } else { |
|
| 114 | 112 | $statusSymbol = self::STATUS_SYMBOL_REJECTED; |
| 115 | 113 | } |
| 116 | 114 | } |
@@ -207,7 +205,7 @@ discard block |
||
| 207 | 205 | |
| 208 | 206 | $entryComment = $entry->getComment(); |
| 209 | 207 | |
| 210 | - if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest'){ |
|
| 208 | + if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest') { |
|
| 211 | 209 | $data = unserialize($entry->getComment()); |
| 212 | 210 | /** @var JobQueue $job */ |
| 213 | 211 | $job = JobQueue::getById($data['job'], $database); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $requestLogs[] = array( |
| 178 | 178 | 'type' => 'comment', |
| 179 | 179 | 'security' => $entry->getVisibility(), |
| 180 | - 'user' => $entry->getVisibility() == 'requester' ? $request->getName() :$nameCache[$entry->getUser()]->getUsername(), |
|
| 180 | + 'user' => $entry->getVisibility() == 'requester' ? $request->getName() : $nameCache[$entry->getUser()]->getUsername(), |
|
| 181 | 181 | 'userid' => $entry->getUser() == -1 ? null : $entry->getUser(), |
| 182 | 182 | 'entry' => null, |
| 183 | 183 | 'time' => $entry->getTime(), |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | $entryComment = $entry->getComment(); |
| 195 | 195 | |
| 196 | - if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest'){ |
|
| 196 | + if ($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest') { |
|
| 197 | 197 | $data = unserialize($entry->getComment()); |
| 198 | 198 | /** @var JobQueue $job */ |
| 199 | 199 | $job = JobQueue::getById($data['job'], $database); |
@@ -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)) { |