Commit 1ebc4b32 authored by Chef Projet Prodige's avatar Chef Projet Prodige
Browse files

Merge branch 'develop' into 'master'

Correction détection de projection

See merge request alkante/bdl_visualiseur_core!2
parents 410006ec a91a0cea
......@@ -33,9 +33,6 @@ class UploadController extends ControllerBase
return $response;
}
$isToEditing = $this->request->get("to_editing");
$isToEditing = intval($isToEditing) ? true : false;
$account = $this->request->get("account");
$accountPath = $this->getServicePath($account);
......@@ -144,10 +141,6 @@ class UploadController extends ControllerBase
} elseif (isset($jsonFile)) {
$jsonFile->moveTo($targetDirectory . $this->sanitizeFilename($jsonFile->getName()));
$mainFilename = $this->sanitizeFilename($jsonFile->getName());
if($isToEditing){
$content = file_get_contents($targetDirectory.$mainFilename);
return $response->setJsonContent(array("data" => json_decode($content, true), 'type' => 'json', "success" => true));
}
} elseif (isset($csvFile)) {
$csvFile->moveTo($targetDirectory . $this->sanitizeFilename($csvFile->getName()));
$mainFilename = $this->sanitizeFilename($csvFile->getName());
......@@ -423,7 +416,8 @@ class UploadController extends ControllerBase
protected function getSrsFromOgrinfoOutput($output)
{
$srsPrefix = 'AUTHORITY\["EPSG","';
//reverse since it's last info that is interesting
$output = array_reverse ($output);
foreach ($output as $outputline) {
if (preg_match("/" . $srsPrefix . "/", $outputline)) {
$currentSrs = trim(str_replace('AUTHORITY["EPSG","', "", str_replace('"]]', "", $outputline)));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment