@@ 4354-4366 (lines=13) @@ | ||
4351 | */ |
|
4352 | public function save_settings() |
|
4353 | { |
|
4354 | if (! isset($this->_req_data['type'])) { |
|
4355 | EE_Error::add_error( |
|
4356 | esc_html__( |
|
4357 | 'Cannot save settings because type is unknown (messenger settings or messsage type settings?)', |
|
4358 | 'event_espresso' |
|
4359 | ), |
|
4360 | __FILE__, |
|
4361 | __FUNCTION__, |
|
4362 | __LINE__ |
|
4363 | ); |
|
4364 | $this->_template_args['error'] = true; |
|
4365 | $this->_return_json(); |
|
4366 | } |
|
4367 | ||
4368 | ||
4369 | if ($this->_req_data['type'] === 'messenger') { |
@@ 569-581 (lines=13) @@ | ||
566 | { |
|
567 | // first make sure the ID for the event is in the request. |
|
568 | // If it isn't then we need to bail and redirect back to overview list table (cause how did we get here?) |
|
569 | if (! isset($this->_req_data['EVT_ID'])) { |
|
570 | EE_Error::add_error( |
|
571 | esc_html__( |
|
572 | 'In order to duplicate an event an Event ID is required. None was given.', |
|
573 | 'event_espresso' |
|
574 | ), |
|
575 | __FILE__, |
|
576 | __FUNCTION__, |
|
577 | __LINE__ |
|
578 | ); |
|
579 | $this->_redirect_after_action(false, '', '', array(), true); |
|
580 | return; |
|
581 | } |
|
582 | // k we've got EVT_ID so let's use that to get the event we'll duplicate |
|
583 | $orig_event = EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']); |
|
584 | if (! $orig_event instanceof EE_Event) { |