From db68e581eb51b71e644defc886eb98c2c17d1674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fl=C3=BCr?= Date: Mon, 18 Jul 2016 10:33:34 +0200 Subject: [PATCH 1/6] Fixed issue #11455: MapQuest discontinued their free services dev changed to OpenStreetmaps official added all OSM-layers --- scripts/map.js | 84 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/scripts/map.js b/scripts/map.js index bd6d4c58185..88c76f4df0a 100644 --- a/scripts/map.js +++ b/scripts/map.js @@ -43,38 +43,54 @@ function isvalidCoord(val){ // OSMap functions function OSGeoInitialize(question,latLng){ + var tileServerURL = { + OSM : "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}", + HUM : "http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}", + CYC : "http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}", + TRA : "http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}" + }; var name = question.substr(0,question.length - 2); // tiles layers def + // If not latLng is set the Map will center to Hamburg var MapOption=LSmaps[name]; if(isNaN(MapOption.latitude) || MapOption.latitude==""){ - MapOption.latitude=0; + MapOption.latitude=53.582665; } if(isNaN(MapOption.longitude) || MapOption.longitude==""){ - MapOption.longitude=0; + MapOption.longitude=10.018924; } - var mapquestOSM = L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png", { + var mapOSM = L.tileLayer(tileServerURL.OSM+".png", { maxZoom: 19, - subdomains: ["otile1", "otile2", "otile3", "otile4"], - attribution: 'Tiles courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA.' + subdomains: ["a", "b", "c"], + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA.' }); - var mapquestOAM = L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { - maxZoom: 10, - subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"], - attribution: 'Tiles courtesy of MapQuest. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' + var mapCYC = L.tileLayer(tileServerURL.CYC+".png", { + maxZoom: 19, + subdomains: ["a", "b", "c"], + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA.' }); - var mapquestHYB = L.layerGroup([L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg", { - maxZoom: 10, - subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"] - }), L.tileLayer("//{s}.mqcdn.com/tiles/1.0.0/hyb/{z}/{x}/{y}.png", { + var mapHOT = L.layerGroup([L.tileLayer(tileServerURL.HUM+".png", { + maxZoom: 20, + subdomains: ["a", "b", "c"], + }), L.tileLayer(tileServerURL+".png", { + maxZoom: 19, + subdomains: ["a", "b", "c"], + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA.' + })]); + var mapTRA = L.layerGroup([L.tileLayer(tileServerURL.TRA+".png", { + maxZoom: 19, + subdomains: ["a", "b", "c"], + }), L.tileLayer(tileServerURL+".png", { maxZoom: 19, - subdomains: ["oatile1", "oatile2", "oatile3", "oatile4"], - attribution: 'Labels courtesy of MapQuest. Map data © OpenStreetMap contributors, CC-BY-SA. Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' + subdomains: ["a", "b", "c"], + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA.' })]); var baseLayers = { - "Street Map": mapquestOSM, - "Aerial Imagery": mapquestOAM, - "Imagery with Streets": mapquestHYB + "Street Map": mapOSM, + "Humanitarian": mapHOT, + "Cyclemap": mapCYC, + "Traffic Map" : mapTRA }; var overlays = { }; @@ -83,7 +99,7 @@ function OSGeoInitialize(question,latLng){ minZoom:1, center: [MapOption.latitude, MapOption.longitude] , maxBounds: ([[-90, -180],[90, 180]]), - layers: [mapquestOSM] + layers: [mapOSM] }); //function zoomExtent(){ // todo: restrict to rect ? // map.setView([15, 15],1); @@ -127,6 +143,26 @@ function OSGeoInitialize(question,latLng){ UI_update(e.latlng.lat,e.latlng.lng) } ) + + // Zoom to 11 when switching to Aerial or Hybrid views - bug 10589 + var layer2Name, layer3Name, layerIndex = 0; + for (var key in baseLayers) { + if (!baseLayers.hasOwnProperty(key)) { + continue; + } + if(layerIndex == 1) { + layer2Name = key; + } + else if(layerIndex == 2) { + layer3Name = key; + } + layerIndex++; + } + map.on('baselayerchange', function(e) { + if(e.name == layer2Name || e.name == layer3Name) { + map.setZoom(11); + } + }); marker.on('dragend', function(e){ var marker = e.target; @@ -293,16 +329,6 @@ function GMapsInitialize(question,lat,lng) { geocodeAddress(name, event.latLng); $("#answer"+question).val(Math.round(event.latLng.lat()*10000)/10000 + " " + Math.round(event.latLng.lng()*10000)/10000); }); - - $("#answer"+question).on('input', function() { - var c = $("#answer"+question).val().split(" "); - if (c.length === 2) { - var latLng = new google.maps.LatLng(c[0], c[1]); - map.panTo(latLng); - marker.setPosition(latLng); - geocodeAddress(name, latLng); - } - }); } // Reset map when shown by conditions From b66df5557ed68b521ee2dfe152af17d7c4413bf1 Mon Sep 17 00:00:00 2001 From: Olle Haerstedt Date: Wed, 12 Oct 2016 15:17:32 +0200 Subject: [PATCH 2/6] Dev: Ignore vim undo files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d9d9d4924c8..479bc39764b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ .settings/org.eclipse.php.core.prefs .buildpath /application/config/config.php +*un~ From 60338d842eb8ac1760b6cd7f87088fe59ebaaf8e Mon Sep 17 00:00:00 2001 From: Olle Haerstedt Date: Wed, 12 Oct 2016 15:18:29 +0200 Subject: [PATCH 3/6] Fixed issue #11772: Expression manager convert_value does not obey strict setting --- application/helpers/expressions/em_core_helper.php | 2 +- scripts/expressions/em_javascript.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/helpers/expressions/em_core_helper.php b/application/helpers/expressions/em_core_helper.php index 5963a3f6672..89fcb004a82 100644 --- a/application/helpers/expressions/em_core_helper.php +++ b/application/helpers/expressions/em_core_helper.php @@ -2707,7 +2707,7 @@ function exprmgr_convert_value($fValueToReplace, $iStrict, $sTranslateFromList, $iNearestIndex = $i; } } - if ( $iStrict !== 1 ) { + if ( $iStrict != 1 ) { return $aToValues[$iNearestIndex]; } } diff --git a/scripts/expressions/em_javascript.js b/scripts/expressions/em_javascript.js index 0fc3cd8e9c4..afda0b0cbd7 100644 --- a/scripts/expressions/em_javascript.js +++ b/scripts/expressions/em_javascript.js @@ -254,7 +254,7 @@ function LEMconvert_value( fValueToReplace, iStrict, sTranslateFromList, sTransl iNearestIndex = i; } } - if ( iStrict !== 1 ) { + if ( iStrict != 1 ) { return aToValues[iNearestIndex]; } } From 55adc402f9431f7fd62a2d50531621208cd2155f Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 24 Oct 2016 13:13:48 +0200 Subject: [PATCH 4/6] Fixed issue #11827: Email bounce processing fails on PHP 7 --- application/controllers/admin/tokens.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/admin/tokens.php b/application/controllers/admin/tokens.php index bec9ce2b766..2c649c061d8 100644 --- a/application/controllers/admin/tokens.php +++ b/application/controllers/admin/tokens.php @@ -104,7 +104,7 @@ function bounceprocessing($iSurveyId) $hostencryption=strtoupper($thissurvey['bounceaccountencryption']); } - @list($hostname, $port) = split(':', $hostname); + @list($hostname, $port) = explode(':', $hostname); if (empty($port)) { if ($accounttype == "IMAP") From 7b57620db04e61fcde7f8c30fc332eb30f8a29c2 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Mon, 24 Oct 2016 13:21:12 +0200 Subject: [PATCH 5/6] Release 2.6.1-lts Build 161024 --- application/config/version.php | 2 +- docs/release_notes.txt | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/application/config/version.php b/application/config/version.php index 311636522a7..0ff5e6a5abd 100644 --- a/application/config/version.php +++ b/application/config/version.php @@ -12,7 +12,7 @@ *150413 */ -$config['versionnumber'] = "2.06lts"; +$config['versionnumber'] = "2.6.1-lts"; $config['dbversionnumber'] = 184; $config['buildnumber'] = ''; $config['updatable'] = true; diff --git a/docs/release_notes.txt b/docs/release_notes.txt index c170b2388d8..40d229d0cca 100644 --- a/docs/release_notes.txt +++ b/docs/release_notes.txt @@ -60,6 +60,14 @@ CHANGE LOG ------------------------------------------------------ +Changes from 2.06LTS (build 160801) to 2.6.1LTS (build 161024) Oct 24, 2016 +-Fixed issue #11455: MapQuest discontinued their free services (Markus Flür) +-Fixed issue #11509: numerical input option integer only leads to positive integer input only (Denis Chenu) +-Fixed issue #11613: Importing a participant having an empty token field is not possible (Carsten Schmitz) +-Fixed issue #11772: Expression manager convert_value does not obey strict setting (Olle Haerstedt) +-Fixed issue #11827: Email bounce processing fails on PHP 7 (Carsten Schmitz) +-Fixed issue: ~ and _ in tokens hard to manually enter (Carsten Schmitz) + Changes from 2.06LTS (build 160524) to 2.06LTS (build 160801) Aug 1, 2016 -Fixed issue #10226: {ANSWERTABLE} includes