Skip to content

Commit

Permalink
Fixed SRID setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Moore committed Aug 12, 2016
1 parent e9cf40f commit e5302fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wp-geometa.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private function added_meta( $meta_type, $meta_id, $object_id, $meta_key, $meta_
$meta_id,
$meta_key,
$meta_value,
$this->srid,
WP_GeoUtil::get_srid(),
)
)
);
Expand Down Expand Up @@ -336,7 +336,7 @@ private function updated_meta( $meta_type, $meta_id, $object_id, $meta_key, $met
$id_column = 'user' === $meta_type ? 'umeta_id' : 'meta_id';

$q = "UPDATE $table SET meta_value=GeomFromText(%s,%d) WHERE fk_meta_id=(%d)";
$sql = $wpdb->prepare( $q,array( $meta_value, $this->srid, $meta_id ) ); // @codingStandardsIgnoreLine
$sql = $wpdb->prepare( $q,array( $meta_value, WP_GeoUtil::get_srid(), $meta_id ) ); // @codingStandardsIgnoreLine
$count = $wpdb->query( $sql );

if ( ! $count ) {
Expand Down

0 comments on commit e5302fe

Please sign in to comment.