Commit e84b6e58 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

fix du pb d'indentation à l'export #134

parent 191f7ef0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -7,8 +7,9 @@ import module namespace max.config = 'pddn/max/config' at '../../rxq/config.xqm'
declare
%rest:GET
%output:media-type("application/octet-stream")
%rest:query-param("indent", "{$indent}", 'false')
%rest:path("/{$project}/{$archive}.zip")
function max.plugin.sources_export:export($project, $archive){
function max.plugin.sources_export:export($project, $archive, $indent){
    if($project != $archive)
    then
        fn:error(xs:QName("err:sources_export"), "Archive does not exist :  '" || $archive||".zip'")
@@ -18,7 +19,7 @@ function max.plugin.sources_export:export($project, $archive){
        let $tmpDir := file:create-temp-dir('max-export',$project)
        let $dest := $tmpDir ||'/'||$zipName
        return (
                db:export($db, $tmpDir),
                db:export($db, $tmpDir, map { 'indent': if($indent='true') then true() else false()}),
                max.plugin.sources_export:makeZip($project,$tmpDir, $dest),
                (<rest:response>
                    <http:response status="200">