Code Duplication    Length = 15-16 lines in 2 locations

admin_pages/venues/Venues_Admin_Page.core.php 1 location

@@ 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)

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 2696-2711 (lines=16) @@
2693
     *
2694
     * @param bool $new_category true means we're triggering the insert of a new category.
2695
     */
2696
    protected function _insert_or_update_category($new_category)
2697
    {
2698
        $cat_id = $new_category ? $this->_insert_category() : $this->_insert_category(true);
2699
        $success = 0; // we already have a success message so lets not send another.
2700
        if ($cat_id) {
2701
            $query_args = array(
2702
                'action'     => 'edit_category',
2703
                'EVT_CAT_ID' => $cat_id,
2704
            );
2705
        } else {
2706
            $query_args = array('action' => 'add_category');
2707
        }
2708
        $this->_redirect_after_action($success, '', '', $query_args, true);
2709
    }
2710
2711
2712
    /**
2713
     * Inserts or updates category
2714
     *