regex fixed, updated event_geotag to v01.36 (#125)

Co-authored-by: surrim <surrim@happyhydro.org>
This commit is contained in:
surrim 2021-05-28 19:12:09 +02:00 committed by GitHub
parent 73536eda3f
commit eff22e3f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
1.36 (surrim)
----------------------------------
* RegEx fixed (pattern: /^\s*([+-]?([0-9]+([.][0-9]*)?|[.][0-9]+))\s*[ ,\/]\s*([+-]?([0-9]+([.][0-9]*)?|[.][0-9]+))\s*$/)
1.35 (surrim)
----------------------------------
* Supports using a space character for LAT/LNG separation (OsmAnd)

View file

@ -1,5 +1,5 @@
<?php
// Actual version of both plugins
@define('PLUGIN_EVENT_GEOTAG_VERSION', '1.35');
@define('PLUGIN_EVENT_GEOTAG_VERSION', '1.36');
@define('PLUGIN_EVENT_GEOTAG_AUTHOR', 'Zoran Kovacevic, Grischa Brockhaus, Matthias Gutjahr, Martin Sewelies');

View file

@ -357,7 +357,7 @@ class serendipity_event_geotag extends serendipity_event
const found = geo.match(/^\s*([+-]?([0-9]+([.][0-9]*)?|[.][0-9]+))\s*[ ,\/]\s*([+-]?([0-9]+([.][0-9]*)?|[.][0-9]+))\s*$/);
if (found !== null) {
this.value = found[1];
document.getElementById(this.id === "properties_geo_lat" ? "properties_geo_long" : "properties_geo_lat").value = found[3];
document.getElementById(this.id === "properties_geo_lat" ? "properties_geo_long" : "properties_geo_lat").value = found[4];
} else {
this.value = geo;
}