|
@@ 70-72 (lines=3) @@
|
| 67 |
|
{ |
| 68 |
|
// find feedback post by id |
| 69 |
|
$record = FeedbackPost::find($id); |
| 70 |
|
if ($record === null || $record === false) { |
| 71 |
|
throw new NotFoundException(__('The feedback message is not founded')); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
// initialize model with answer add if thread is not closed |
| 75 |
|
$model = null; |
|
@@ 113-115 (lines=3) @@
|
| 110 |
|
} |
| 111 |
|
|
| 112 |
|
// try what we got |
| 113 |
|
if ($record === null || $record === false) { |
| 114 |
|
throw new NotFoundException(__('Feedback item is not founded')); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
// initialize model |
| 118 |
|
$model = new FormUpdate($record); |
|
@@ 146-148 (lines=3) @@
|
| 143 |
|
{ |
| 144 |
|
// try to find record |
| 145 |
|
$record = FeedbackPost::find($id); |
| 146 |
|
if ($record === null || $record === false) { |
| 147 |
|
throw new NotFoundException(__('Feedback request with id %id% is not found', ['id' => $id])); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
// switch operation direction to what we must change |
| 151 |
|
switch ($direction) { |
|
@@ 200-202 (lines=3) @@
|
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
// check if we get the row |
| 200 |
|
if ($record === null || $record === false) { |
| 201 |
|
throw new NotFoundException(__('Feedback item is not founded')); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
// if delete is submited |
| 205 |
|
if (App::$Request->request->get('deleteFeedback')) { |