| @@ 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 | ||
| @@ 1079-1084 (lines=6) @@ | ||
| 1076 | $this->cart->get_grand_total() |
|
| 1077 | ); |
|
| 1078 | } |
|
| 1079 | if ( $grand_total instanceof EE_Line_Item ) { |
|
| 1080 | $this->cart = EE_Cart::instance( $grand_total ); |
|
| 1081 | } else { |
|
| 1082 | EE_Error::add_error( __( 'A valid Cart was not found when attempting to update the model entity mapper.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
| 1083 | return false; |
|
| 1084 | } |
|
| 1085 | } |
|
| 1086 | return TRUE; |
|
| 1087 | } |
|
| @@ 410-413 (lines=4) @@ | ||
| 407 | ) { |
|
| 408 | //update Config with post ID |
|
| 409 | $EE_Core_Config->{$critical_page[ 'id' ]} = $critical_page['post']->ID; |
|
| 410 | if ( ! EE_Config::instance()->update_espresso_config( FALSE, FALSE ) ) { |
|
| 411 | $msg = __( 'The Event Espresso critical page configuration settings could not be updated.', 'event_espresso' ); |
|
| 412 | EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ ); |
|
| 413 | } |
|
| 414 | } |
|
| 415 | ||
| 416 | $critical_page_problem = |
|