| @@ 105-109 (lines=5) @@ | ||
| 102 | $this->redirect(['controller' => 'reports', 'action' => 'view', |
|
| 103 | $reportId, |
|
| 104 | ]); |
|
| 105 | } else { |
|
| 106 | $flash_class = 'alert alert-error'; |
|
| 107 | $this->Flash->default( |
|
| 108 | $this->_getErrors($issueDetails, $status), |
|
| 109 | ['params' => ['class' => $flash_class]] |
|
| 110 | ); |
|
| 111 | } |
|
| 112 | } |
|
| @@ 171-175 (lines=5) @@ | ||
| 168 | } |
|
| 169 | ||
| 170 | $reportsTable->save($report); |
|
| 171 | } else { |
|
| 172 | $flash_class = 'alert alert-error'; |
|
| 173 | $this->Flash->default( |
|
| 174 | $this->_getErrors($commentDetails, $status), |
|
| 175 | ['params' => ['class' => $flash_class]] |
|
| 176 | ); |
|
| 177 | } |
|
| 178 | ||
| @@ 230-234 (lines=5) @@ | ||
| 227 | // Update report status |
|
| 228 | $report->status = 'new'; |
|
| 229 | $reportsTable->save($report); |
|
| 230 | } else { |
|
| 231 | $flash_class = 'alert alert-error'; |
|
| 232 | $this->Flash->default( |
|
| 233 | $this->_getErrors($commentDetails, $status), |
|
| 234 | ['params' => ['class' => $flash_class]] |
|
| 235 | ); |
|
| 236 | } |
|
| 237 | ||
| @@ 348-352 (lines=5) @@ | ||
| 345 | TableRegistry::get('Reports')->save($report); |
|
| 346 | } |
|
| 347 | ||
| 348 | if ($msg !== '') { |
|
| 349 | $flash_class = 'alert alert-success'; |
|
| 350 | $this->Flash->default( |
|
| 351 | $msg, |
|
| 352 | ['params' => ['class' => $flash_class]] |
|
| 353 | ); |
|
| 354 | } |
|
| 355 | ||