Skip to content
Permalink
Browse files

PG connection string for layer in export.php fix

  • Loading branch information...
uprel committed Sep 9, 2019
1 parent 358c10e commit 44bfbcb277b5fb54d5641242b9813cdd406cfd7e
Showing with 3 additions and 2 deletions.
  1. +3 −2 admin/export.php
@@ -69,9 +69,10 @@ function prepareFile($layername, $map, $query_arr, $destinationFormat)
case 'postgres':
//other option to get it from layer_info
//$conn = str_replace(array('\'', '"'), '', $layer["message"]->datasource);
$conn = $layer["message"]->datasource;
//$conn = $layer["message"]->datasource;
//removing text sslmode and all after that
$conn = "PG:" . rtrim(substr($conn, 0, strpos($conn, 'sslmode')));
//$conn = "PG:" . rtrim(substr($conn, 0, strpos($conn, 'sslmode')));
$conn = "PG:dbname='".$lay_info['message']['dbname']."' host=".$lay_info['message']['host']." port=".$lay_info['message']['port']." user=".$lay_info['message']['user']." password=".$lay_info['message']['password'];
$table = $lay_info["message"]['table'];
$sql = $lay_info["message"]['sql'];

0 comments on commit 44bfbcb

Please sign in to comment.
You can’t perform that action at this time.