|
@@ 266-271 (lines=6) @@
|
| 263 |
|
|
| 264 |
|
$this->_verify_nonce( $nonce, $nonce_ref ); |
| 265 |
|
//let's get the mtp for the incoming MTP_ ID |
| 266 |
|
if ( !isset( $this->_req_data['GRP_ID'] ) ) { |
| 267 |
|
EE_Error::add_error( __('There must be something broken with the js or html structure because the required data for getting a message template group is not present (need an GRP_ID).', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
| 268 |
|
$this->_template_args['success'] = FALSE; |
| 269 |
|
$this->_template_args['error'] = TRUE; |
| 270 |
|
$this->_return_json(); |
| 271 |
|
} |
| 272 |
|
$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['GRP_ID'] ); |
| 273 |
|
if ( ! $MTPG instanceof EE_Message_Template_Group ) { |
| 274 |
|
EE_Error::add_error( sprintf( __('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID'] ), __FILE__, __FUNCTION__, __LINE__ ); |
|
@@ 273-278 (lines=6) @@
|
| 270 |
|
$this->_return_json(); |
| 271 |
|
} |
| 272 |
|
$MTPG = EEM_Message_Template_Group::instance()->get_one_by_ID( $this->_req_data['GRP_ID'] ); |
| 273 |
|
if ( ! $MTPG instanceof EE_Message_Template_Group ) { |
| 274 |
|
EE_Error::add_error( sprintf( __('The GRP_ID given (%d) does not appear to have a corresponding row in the database.', 'event_espresso'), $this->_req_data['GRP_ID'] ), __FILE__, __FUNCTION__, __LINE__ ); |
| 275 |
|
$this->_template_args['success'] = FALSE; |
| 276 |
|
$this->_template_args['error'] = TRUE; |
| 277 |
|
$this->_return_json(); |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
$MTPs = $MTPG->context_templates(); |
| 281 |
|
$MTPs = $MTPs['attendee']; |
|
@@ 623-628 (lines=6) @@
|
| 620 |
|
*/ |
| 621 |
|
public function toggle_checkin_status() { |
| 622 |
|
//first make sure we have the necessary data |
| 623 |
|
if ( !isset( $this->_req_data['_regid'] ) ) { |
| 624 |
|
EE_Error::add_error( __('There must be something broken with the html structure because the required data for toggling the Check-in status is not being sent via ajax', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
| 625 |
|
$this->_template_args['success'] = FALSE; |
| 626 |
|
$this->_template_args['error'] = TRUE; |
| 627 |
|
$this->_return_json(); |
| 628 |
|
}; |
| 629 |
|
|
| 630 |
|
//do a nonce check cause we're not coming in from an normal route here. |
| 631 |
|
$nonce = isset( $this->_req_data['checkinnonce'] ) ? sanitize_text_field( $this->_req_data['checkinnonce'] ) : ''; |