| @@ 4670-4683 (lines=14) @@ | ||
| 4667 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 4668 | } |
|
| 4669 | } |
|
| 4670 | } elseif ( $import_choice == 'skip' ) {
|
|
| 4671 | if ( (int)$data['location_id'] > 0 && $location = geodir_get_location_by_id( '', (int)$data['location_id'] ) ) {
|
|
| 4672 | $skipped++; |
|
| 4673 | } else if ( !empty( $data['city_slug'] ) && $location = geodir_get_location_by_slug( 'city', array( 'city_slug' => $data['city_slug'] ) ) ) {
|
|
| 4674 | $skipped++; |
|
| 4675 | } else {
|
|
| 4676 | if ( $location_id = geodir_location_insert_city( $data, true ) ) {
|
|
| 4677 | $created++; |
|
| 4678 | } else {
|
|
| 4679 | $invalid++; |
|
| 4680 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 4681 | } |
|
| 4682 | } |
|
| 4683 | } else {
|
|
| 4684 | $invalid++; |
|
| 4685 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 4686 | } |
|
| @@ 4782-4796 (lines=15) @@ | ||
| 4779 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 4780 | } |
|
| 4781 | } |
|
| 4782 | } elseif ( $import_choice == 'skip' ) {
|
|
| 4783 | if ((int)$data['neighbourhood_id'] > 0 && ($neighbourhood = geodir_location_get_neighbourhood_by_id((int)$data['neighbourhood_id']))) {
|
|
| 4784 | $skipped++; |
|
| 4785 | } else if (!empty($data['neighbourhood_slug']) && ($neighbourhood = geodir_location_get_neighbourhood_by_id($data['neighbourhood_slug'], true))) {
|
|
| 4786 | $skipped++; |
|
| 4787 | } else {
|
|
| 4788 | ||
| 4789 | if ($neighbourhood = geodir_location_insert_update_neighbourhood($hood_data)) {
|
|
| 4790 | $created++; |
|
| 4791 | } else {
|
|
| 4792 | $invalid++; |
|
| 4793 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 4794 | } |
|
| 4795 | } |
|
| 4796 | } else {
|
|
| 4797 | $invalid++; |
|
| 4798 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 4799 | } |
|