| @@ 1411-1425 (lines=15) @@ | ||
| 1408 | } |
|
| 1409 | ||
| 1410 | ||
| 1411 | protected function _insert_or_update_category($new_category) |
|
| 1412 | { |
|
| 1413 | ||
| 1414 | $cat_id = $new_category ? $this->_insert_category() : $this->_insert_category(true); |
|
| 1415 | $success = 0; // we already have a success message so lets not send another. |
|
| 1416 | if ($cat_id) { |
|
| 1417 | $query_args = array( |
|
| 1418 | 'action' => 'edit_category', |
|
| 1419 | 'VEN_CAT_ID' => $cat_id, |
|
| 1420 | ); |
|
| 1421 | } else { |
|
| 1422 | $query_args = array('action' => 'add_category'); |
|
| 1423 | } |
|
| 1424 | $this->_redirect_after_action($success, '', '', $query_args, true); |
|
| 1425 | } |
|
| 1426 | ||
| 1427 | ||
| 1428 | private function _insert_category($update = false) |
|
| @@ 2611-2626 (lines=16) @@ | ||
| 2608 | * |
|
| 2609 | * @param bool $new_category true means we're triggering the insert of a new category. |
|
| 2610 | */ |
|
| 2611 | protected function _insert_or_update_category($new_category) |
|
| 2612 | { |
|
| 2613 | $cat_id = $new_category ? $this->_insert_category() : $this->_insert_category(true); |
|
| 2614 | $success = 0; // we already have a success message so lets not send another. |
|
| 2615 | if ($cat_id) { |
|
| 2616 | $query_args = array( |
|
| 2617 | 'action' => 'edit_category', |
|
| 2618 | 'EVT_CAT_ID' => $cat_id, |
|
| 2619 | ); |
|
| 2620 | } else { |
|
| 2621 | $query_args = array('action' => 'add_category'); |
|
| 2622 | } |
|
| 2623 | $this->_redirect_after_action($success, '', '', $query_args, true); |
|
| 2624 | } |
|
| 2625 | ||
| 2626 | ||
| 2627 | /** |
|
| 2628 | * Inserts or updates category |
|
| 2629 | * |
|