| @@ 158-163 (lines=6) @@ | ||
| 155 | ||
| 156 | // Find the fact to edit |
|
| 157 | $edit_fact = null; |
|
| 158 | foreach ($record->getFacts() as $fact) { |
|
| 159 | if ($fact->getFactId() === $fact_id && $fact->canEdit()) { |
|
| 160 | $edit_fact = $fact; |
|
| 161 | break; |
|
| 162 | } |
|
| 163 | } |
|
| 164 | if (!$edit_fact) { |
|
| 165 | header('Location: ' . $record->getRawUrl()); |
|
| 166 | break; |
|
| @@ 262-267 (lines=6) @@ | ||
| 259 | ||
| 260 | // Find the fact to edit |
|
| 261 | $edit_fact = null; |
|
| 262 | foreach ($record->getFacts() as $fact) { |
|
| 263 | if ($fact->getFactId() === $fact_id && $fact->canEdit()) { |
|
| 264 | $edit_fact = $fact; |
|
| 265 | break; |
|
| 266 | } |
|
| 267 | } |
|
| 268 | if (!$edit_fact) { |
|
| 269 | header('Location: ' . $record->getRawUrl()); |
|
| 270 | break; |
|