Code Duplication    Length = 11-16 lines in 2 locations

admin_pages/registrations/Registrations_Admin_Page.core.php 2 locations

@@ 2461-2471 (lines=11) @@
2458
                } else {
2459
                    $query_args['step_error'] = $this->_req_data['step_error'] = true;
2460
                }
2461
                if (defined('DOING_AJAX')) {
2462
                    $this->new_registration(); //display next step
2463
                } else {
2464
                    $query_args = array(
2465
                        'action'                  => 'new_registration',
2466
                        'processing_registration' => 1,
2467
                        'event_id'                => $this->_reg_event->ID(),
2468
                        'uts'                     => time(),
2469
                    );
2470
                    $this->_redirect_after_action(false, '', '', $query_args, true);
2471
                }
2472
                break;
2473
            case 'questions' :
2474
                if ( ! isset($this->_req_data['txn_reg_status_change'], $this->_req_data['txn_reg_status_change']['send_notifications'])) {
@@ 2485-2500 (lines=16) @@
2482
                        $grand_total->save_this_and_descendants_to_txn();
2483
                    }
2484
                }
2485
                if ( ! $transaction instanceof EE_Transaction) {
2486
                    $query_args = array(
2487
                        'action'                  => 'new_registration',
2488
                        'processing_registration' => 2,
2489
                        'event_id'                => $this->_reg_event->ID(),
2490
                        'uts'                     => time(),
2491
                    );
2492
                    if (defined('DOING_AJAX')) {
2493
                        //display registration form again because there are errors (maybe validation?)
2494
                        $this->new_registration();
2495
                        return;
2496
                    } else {
2497
                        $this->_redirect_after_action(false, '', '', $query_args, true);
2498
                        return;
2499
                    }
2500
                }
2501
                // maybe update status, and make sure to save transaction if not done already
2502
                if ( ! $transaction->update_status_based_on_total_paid()) {
2503
                    $transaction->save();