|
@@ 644-648 (lines=5) @@
|
641 |
|
$new_question = $question->duplicate(); |
642 |
|
if( $new_question instanceof EE_Question ) { |
643 |
|
$this->_redirect_after_action( true, __( 'Question', 'event_espresso' ), __( 'Duplicated', 'event_espresso' ), array('action'=>'edit_question', 'QST_ID' => $new_question->ID() ), TRUE); |
644 |
|
} else { |
645 |
|
global $wpdb; |
646 |
|
EE_Error::add_error( sprintf( __( 'Could not duplicate question with ID %1$d because: %2$s', 'event_espresso' ), $question_ID, $wpdb->last_error ), __FILE__, __FUNCTION__, __LINE__ ); |
647 |
|
$this->_redirect_after_action(false, '', '', array('action'=>'default'), false ); |
648 |
|
} |
649 |
|
} else { |
650 |
|
EE_Error::add_error( sprintf( __( 'Could not duplicate question with ID %d because it didn\'t exist!', 'event_espresso' ), $question_ID ), __FILE__, __FUNCTION__, __LINE__ ); |
651 |
|
$this->_redirect_after_action( false, '', '', array( 'action' => 'default' ), false ); |
|
@@ 649-652 (lines=4) @@
|
646 |
|
EE_Error::add_error( sprintf( __( 'Could not duplicate question with ID %1$d because: %2$s', 'event_espresso' ), $question_ID, $wpdb->last_error ), __FILE__, __FUNCTION__, __LINE__ ); |
647 |
|
$this->_redirect_after_action(false, '', '', array('action'=>'default'), false ); |
648 |
|
} |
649 |
|
} else { |
650 |
|
EE_Error::add_error( sprintf( __( 'Could not duplicate question with ID %d because it didn\'t exist!', 'event_espresso' ), $question_ID ), __FILE__, __FUNCTION__, __LINE__ ); |
651 |
|
$this->_redirect_after_action( false, '', '', array( 'action' => 'default' ), false ); |
652 |
|
} |
653 |
|
} |
654 |
|
|
655 |
|
|