| @@ 339-345 (lines=7) @@ | ||
| 336 | { |
|
| 337 | $section_id = $this->_context['id']; |
|
| 338 | ||
| 339 | if (!$section = SectionManager::fetch($section_id)) { |
|
| 340 | Administration::instance()->throwCustomError( |
|
| 341 | __('The Section, %s, could not be found.', array($section_id)), |
|
| 342 | __('Unknown Section'), |
|
| 343 | Page::HTTP_STATUS_NOT_FOUND |
|
| 344 | ); |
|
| 345 | } |
|
| 346 | ||
| 347 | $meta = $section->get(); |
|
| 348 | $section_id = $meta['id']; |
|
| @@ 1188-1194 (lines=7) @@ | ||
| 1185 | ||
| 1186 | EntryManager::setFetchSorting('id', 'DESC'); |
|
| 1187 | ||
| 1188 | if (!$existingEntry = EntryManager::fetch($entry_id)) { |
|
| 1189 | Administration::instance()->throwCustomError( |
|
| 1190 | __('Unknown Entry'), |
|
| 1191 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1192 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1193 | ); |
|
| 1194 | } |
|
| 1195 | $existingEntry = $existingEntry[0]; |
|
| 1196 | ||
| 1197 | // If there is post data floating around, due to errors, create an entry object |
|
| @@ 1381-1387 (lines=7) @@ | ||
| 1378 | $entry_id = intval($this->_context['entry_id']); |
|
| 1379 | ||
| 1380 | if (@array_key_exists('save', $_POST['action']) || @array_key_exists("done", $_POST['action'])) { |
|
| 1381 | if (!$ret = EntryManager::fetch($entry_id)) { |
|
| 1382 | Administration::instance()->throwCustomError( |
|
| 1383 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1384 | __('Unknown Entry'), |
|
| 1385 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1386 | ); |
|
| 1387 | } |
|
| 1388 | ||
| 1389 | $entry = $ret[0]; |
|
| 1390 | ||