]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
Reverse geocode include geometry - added bounding box tests
[nominatim.git] / utils / setup.php
index 07b929a12344e5775426f8a8a5c4f0327f474ae8..eff7b71b447fef7fd36bab87e3db8569fef84231 100755 (executable)
                        pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/postgis.sql');
                        pgsqlRunScriptFile(CONST_Path_Postgresql_Postgis.'/spatial_ref_sys.sql');
                } else {
-                       pgsqlRunScript('CREATE EXTENSION postgis');
+                       pgsqlRunScript('CREATE EXTENSION IF NOT EXISTS postgis');
                }
                if ($fPostgisVersion < 2.1) {
                        // Function was renamed in 2.1 and throws an annoying deprecation warning
                }
        }
 
-       if (isset($aCMDResult['drop']))
+       if ($aCMDResult['drop'])
        {
                // The implementation is potentially a bit dangerous because it uses
                // a positive selection of tables to keep, and deletes everything else.