| @@ 511-523 (lines=13) @@ | ||
| 508 | { |
|
| 509 | // first make sure the ID for the event is in the request. |
|
| 510 | // If it isn't then we need to bail and redirect back to overview list table (cause how did we get here?) |
|
| 511 | if (! isset($this->_req_data['EVT_ID'])) { |
|
| 512 | EE_Error::add_error( |
|
| 513 | esc_html__( |
|
| 514 | 'In order to duplicate an event an Event ID is required. None was given.', |
|
| 515 | 'event_espresso' |
|
| 516 | ), |
|
| 517 | __FILE__, |
|
| 518 | __FUNCTION__, |
|
| 519 | __LINE__ |
|
| 520 | ); |
|
| 521 | $this->_redirect_after_action(false, '', '', array(), true); |
|
| 522 | return; |
|
| 523 | } |
|
| 524 | // k we've got EVT_ID so let's use that to get the event we'll duplicate |
|
| 525 | $orig_event = EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']); |
|
| 526 | if (! $orig_event instanceof EE_Event) { |
|
| @@ 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') { |
|