]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 5 Dec 2018 20:40:52 +0000 (21:40 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 5 Dec 2018 20:40:52 +0000 (21:40 +0100)
1  2 
CMakeLists.txt
lib/lib.php
utils/update.php
website/reverse.php

diff --combined CMakeLists.txt
index 7c5763fd47b678f03f7ac7f998c04c6b394c8023,7d401ade35a5427ad38a06adc98dc0d75c46a17b..8f9de5ec711b1a0c2d5cbf1058858d49415e9801
@@@ -93,8 -93,7 +93,7 @@@ message (STATUS "Using PHP binary " ${P
  #
  #-----------------------------------------------------------------------------
  
- set(CUSTOMFILES
-     settings/phrase_settings.php
+ set(WEBSITESCRIPTS
      website/deletable.php
      website/details.php
      website/hierarchy.php
      website/reverse.php
      website/search.php
      website/status.php
-     website/403.html
-     website/509.html
-     website/crossdomain.xml
-     website/favicon.ico
-     website/last_update.php
-     website/nominatim.xml
-     website/robots.txt
-     website/taginfo.json
-     utils/blocks.php
+ )
++set(WEBSITEFILES
++    403.html
++    509.html
++    crossdomain.xml
++    favicon.ico
++    last_update.php
++    nominatim.xml
++    robots.txt
++    taginfo.json
++)
++
+ set(CUSTOMSCRIPTS
      utils/country_languages.php
      utils/importWikipedia.php
      utils/export.php
      utils/query.php
-     utils/server_compare.php
      utils/setup.php
      utils/specialphrases.php
      utils/update.php
      utils/warm.php
     )
  
- foreach (cfile ${CUSTOMFILES})
-     configure_file(${PROJECT_SOURCE_DIR}/${cfile} ${PROJECT_BINARY_DIR}/${cfile})
+ foreach (script_source ${CUSTOMSCRIPTS})
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl
+                    ${PROJECT_BINARY_DIR}/${script_source})
  endforeach()
  
- configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php ${PROJECT_BINARY_DIR}/settings/settings.php)
+ foreach (script_source ${WEBSITESCRIPTS})
+     configure_file(${PROJECT_SOURCE_DIR}/cmake/website.tmpl
+                    ${PROJECT_BINARY_DIR}/${script_source})
+ endforeach()
++foreach (webfile ${WEBSITEFILES})
++    configure_file(${PROJECT_SOURCE_DIR}/website/${webfile}
++                   ${PROJECT_BINARY_DIR}/website/${webfile})
++endforeach()
++
+ configure_file(${PROJECT_SOURCE_DIR}/settings/defaults.php
+                ${PROJECT_BINARY_DIR}/settings/settings.php)
  
  set(WEBPATHS css images js)
  
diff --combined lib/lib.php
index 37ef5e190ba2d405447abe736cc1cc3feac12daf,39462ae3cc8b819c9d3843a687db8b326db925e2..3a6166a60e022d3921ce54db8d48d051b8cbade4
@@@ -68,7 -68,7 +68,7 @@@ function javascript_renderData($xVal, $
          throw new Exception('Invalid json_callback value', 400);
      }
  
-     $iOptions |= JSON_UNESCAPED_UNICODE;
+     $iOptions |= JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
      if (isset($_GET['pretty']) && in_array(strtolower($_GET['pretty']), array('1', 'true'))) {
          $iOptions |= JSON_PRETTY_PRINT;
      }
@@@ -177,10 -177,10 +177,10 @@@ function geometryText2Points($geometry_
          //
          preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/', $aMatch[1], $aPolyPoints, PREG_SET_ORDER);
          //
 -    } elseif (preg_match('#MULTIPOLYGON\\(\\(\\(([- 0-9.,]+)#', $geometry_as_text, $aMatch)) {
 +/*    } elseif (preg_match('#MULTIPOLYGON\\(\\(\\(([- 0-9.,]+)#', $geometry_as_text, $aMatch)) {
          //
          preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/', $aMatch[1], $aPolyPoints, PREG_SET_ORDER);
 -        //
 +        */
      } elseif (preg_match('#POINT\\((-?[0-9.]+) (-?[0-9.]+)\\)#', $geometry_as_text, $aMatch)) {
          //
          $aPolyPoints = createPointsAroundCenter($aMatch[1], $aMatch[2], $fRadius);
diff --combined utils/update.php
index a5170ae590dd9f3cc20606021237cc0a314600b4,24095ef48f3855590d3e5cd3748d14746901df36..05c43946e2d1282c48c1613fe67390399fb7874e
mode 100755,100644..100644
@@@ -1,7 -1,5 +1,5 @@@
- #!@PHP_BIN@ -Cq
  <?php
  
- require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
  require_once(CONST_BasePath.'/lib/init-cmd.php');
  require_once(CONST_BasePath.'/lib/setup_functions.php');
  require_once(CONST_BasePath.'/lib/setup/SetupClass.php');
@@@ -50,7 -48,6 +48,7 @@@ $aCMDOption
  getCmdOpt($_SERVER['argv'], $aCMDOptions, $aResult, true, true);
  
  if (!isset($aResult['index-instances'])) $aResult['index-instances'] = 1;
 +
  if (!isset($aResult['index-rank'])) $aResult['index-rank'] = 0;
  
  date_default_timezone_set('Etc/UTC');
diff --combined website/reverse.php
index 075d4cf032c7678e8b643935b14c95293db67a27,0ba1771474512b7255a2e0cc1e640421786552ec..6864d65e84340b71e2451793f4bca81764a2014d
mode 100755,100644..100644
@@@ -1,7 -1,5 +1,5 @@@
  <?php
- @define('CONST_ConnectionBucket_PageType', 'Reverse');
  
- require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
  require_once(CONST_BasePath.'/lib/init-website.php');
  require_once(CONST_BasePath.'/lib/log.php');
  require_once(CONST_BasePath.'/lib/PlaceLookup.php');
@@@ -68,7 -66,6 +66,7 @@@ if (isset($aPlace)) 
      $aPlace = array();
  }
  
 +logEnd($oDB, $hLog, sizeof($aPlace)?1:0);
  
  if (CONST_Debug) {
      var_dump($aPlace);