| @@ 413-419 (lines=7) @@ | ||
| 410 | { |
|
| 411 | $section_id = $this->_context['id']; |
|
| 412 | ||
| 413 | if (!$section = SectionManager::fetch($section_id)) { |
|
| 414 | Administration::instance()->throwCustomError( |
|
| 415 | __('The Section, %s, could not be found.', array($section_id)), |
|
| 416 | __('Unknown Section'), |
|
| 417 | Page::HTTP_STATUS_NOT_FOUND |
|
| 418 | ); |
|
| 419 | } |
|
| 420 | ||
| 421 | $meta = $section->get(); |
|
| 422 | $section_id = $meta['id']; |
|
| @@ 1610-1616 (lines=7) @@ | ||
| 1607 | ||
| 1608 | EntryManager::setFetchSorting('id', 'DESC'); |
|
| 1609 | ||
| 1610 | if (!$existingEntry = EntryManager::fetch($entry_id)) { |
|
| 1611 | Administration::instance()->throwCustomError( |
|
| 1612 | __('Unknown Entry'), |
|
| 1613 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1614 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1615 | ); |
|
| 1616 | } |
|
| 1617 | $existingEntry = $existingEntry[0]; |
|
| 1618 | ||
| 1619 | // If there is post data floating around, due to errors, create an entry object |
|
| @@ 1814-1820 (lines=7) @@ | ||
| 1811 | $entry_id = intval($this->_context['entry_id']); |
|
| 1812 | ||
| 1813 | if (@array_key_exists('save', $_POST['action']) || @array_key_exists("done", $_POST['action'])) { |
|
| 1814 | if (!$ret = EntryManager::fetch($entry_id)) { |
|
| 1815 | Administration::instance()->throwCustomError( |
|
| 1816 | __('The Entry, %s, could not be found.', array($entry_id)), |
|
| 1817 | __('Unknown Entry'), |
|
| 1818 | Page::HTTP_STATUS_NOT_FOUND |
|
| 1819 | ); |
|
| 1820 | } |
|
| 1821 | ||
| 1822 | $entry = $ret[0]; |
|
| 1823 | ||