regex fixed, updated event_geotag to v01.36 (#125)
Co-authored-by: surrim <surrim@happyhydro.org>
This commit is contained in:
parent
73536eda3f
commit
eff22e3f60
|
@ -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)
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue