| @@ 377-383 (lines=7) @@ | ||
| 374 | 	public function save_data_rows_to_db( $csv_data_array, $export_from_site_a_to_b, $old_db_to_new_db_mapping ) { | |
| 375 | 		foreach ( $csv_data_array as $model_name_in_csv_data => $model_data_from_import ) { | |
| 376 | //now check that assumption was correct. If | |
| 377 | 			if ( EE_Registry::instance()->is_model_name($model_name_in_csv_data)) { | |
| 378 | $model_name = $model_name_in_csv_data; | |
| 379 | 			}else { | |
| 380 | // no table info in the array and no table name passed to the function?? FAIL | |
| 381 | 				EE_Error::add_error( __('No table information was specified and/or found, therefore the import could not be completed','event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); | |
| 382 | return FALSE; | |
| 383 | } | |
| 384 | /* @var $model EEM_Base */ | |
| 385 | $model = EE_Registry::instance()->load_model($model_name); | |
| 386 | ||
| @@ 396-399 (lines=4) @@ | ||
| 393 | 			if ( isset( $critical_page['post']->ID ) && $critical_page['post']->ID != EE_Registry::instance()->CFG->core->$critical_page['id'] ) { | |
| 394 | //update Config with post ID | |
| 395 | EE_Registry::instance()->CFG->core->$critical_page['id'] = $critical_page['post']->ID; | |
| 396 | 				if ( ! EE_Config::instance()->update_espresso_config( FALSE, FALSE ) ) { | |
| 397 | $msg = __( 'The Event Espresso critical page configuration settings could not be updated.', 'event_espresso' ); | |
| 398 | EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); | |
| 399 | } | |
| 400 | } | |
| 401 | ||
| 402 | $critical_page_problem = ! isset( $critical_page['post']->post_status ) || $critical_page['post']->post_status != 'publish' || strpos( $critical_page['post']->post_content, $critical_page['code'] ) === FALSE ? TRUE : $critical_page_problem; | |
| @@ 1067-1072 (lines=6) @@ | ||
| 1064 | $this->cart->get_grand_total() | |
| 1065 | ); | |
| 1066 | } | |
| 1067 | 			if ( $grand_total instanceof EE_Line_Item ) { | |
| 1068 | $this->cart = EE_Cart::instance( $grand_total ); | |
| 1069 | 			} else { | |
| 1070 | EE_Error::add_error( __( 'A valid Cart was not found when attempting to update the model entity mapper.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); | |
| 1071 | return false; | |
| 1072 | } | |
| 1073 | } | |
| 1074 | return TRUE; | |
| 1075 | } | |