| @@ 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']; |
|
| @@ 1209-1215 (lines=7) @@ | ||
| 1206 | ||
| 1207 | EntryManager::setFetchSorting('id', 'DESC'); |
|
| 1208 | ||
| 1209 | if (!$existingEntry = EntryManager::fetch($entry_id)) { |
|
| 1210 | Administration::instance()->throwCustomError( |
|
| 1211 | __('Unknown Entry'), |
|
| 1212 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1213 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1214 | ); |
|
| 1215 | } |
|
| 1216 | $existingEntry = $existingEntry[0]; |
|
| 1217 | ||
| 1218 | // If there is post data floating around, due to errors, create an entry object |
|
| @@ 1402-1408 (lines=7) @@ | ||
| 1399 | $entry_id = intval($this->_context['entry_id']); |
|
| 1400 | ||
| 1401 | if (is_array($_POST['action']) && (array_key_exists('save', $_POST['action']) || array_key_exists("done", $_POST['action']))) { |
|
| 1402 | if (!$ret = EntryManager::fetch($entry_id)) { |
|
| 1403 | Administration::instance()->throwCustomError( |
|
| 1404 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1405 | __('Unknown Entry'), |
|
| 1406 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1407 | ); |
|
| 1408 | } |
|
| 1409 | ||
| 1410 | $entry = $ret[0]; |
|
| 1411 | ||