Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
prodige
bdl_visualiseur_core
Commits
1ebc4b32
Commit
1ebc4b32
authored
Apr 24, 2020
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Controllers/UploadController.php
View file @
1ebc4b32
...
...
@@ -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
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment