| @@ 5007-5020 (lines=14) @@ | ||
| 5004 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 5005 | } |
|
| 5006 | } |
|
| 5007 | } elseif ( $import_choice == 'skip' ) {
|
|
| 5008 | if ( (int)$data['location_id'] > 0 && $location = geodir_get_location_by_id( '', (int)$data['location_id'] ) ) {
|
|
| 5009 | $skipped++; |
|
| 5010 | } else if ( !empty( $data['city_slug'] ) && $location = geodir_get_location_by_slug( 'city', array( 'city_slug' => $data['city_slug'] ) ) ) {
|
|
| 5011 | $skipped++; |
|
| 5012 | } else {
|
|
| 5013 | if ( $location_id = geodir_location_insert_city( $data, true ) ) {
|
|
| 5014 | $created++; |
|
| 5015 | } else {
|
|
| 5016 | $invalid++; |
|
| 5017 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 5018 | } |
|
| 5019 | } |
|
| 5020 | } else {
|
|
| 5021 | $invalid++; |
|
| 5022 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_location ); |
|
| 5023 | } |
|
| @@ 5119-5133 (lines=15) @@ | ||
| 5116 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 5117 | } |
|
| 5118 | } |
|
| 5119 | } elseif ( $import_choice == 'skip' ) {
|
|
| 5120 | if ((int)$data['neighbourhood_id'] > 0 && ($neighbourhood = geodir_location_get_neighbourhood_by_id((int)$data['neighbourhood_id']))) {
|
|
| 5121 | $skipped++; |
|
| 5122 | } else if (!empty($data['neighbourhood_slug']) && ($neighbourhood = geodir_location_get_neighbourhood_by_id($data['neighbourhood_slug'], true))) {
|
|
| 5123 | $skipped++; |
|
| 5124 | } else {
|
|
| 5125 | ||
| 5126 | if ($neighbourhood = geodir_location_insert_update_neighbourhood($hood_data)) {
|
|
| 5127 | $created++; |
|
| 5128 | } else {
|
|
| 5129 | $invalid++; |
|
| 5130 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 5131 | } |
|
| 5132 | } |
|
| 5133 | } else {
|
|
| 5134 | $invalid++; |
|
| 5135 | geodir_error_log( wp_sprintf( $gd_error_log, ($index + 1) ) . ' ' . $gd_error_hood ); |
|
| 5136 | } |
|