correction bugs derivations
[mw_sourceml] / app / controllers / users / morceaux.php
index fce394f..9c3adda 100644 (file)
             $env,
             $origin_source_xml_url,
             $origin_source_xml_content,
-            true
+            false
           );
         }
       }
     }
 
     function maj_xml(){
+      $env = $this->env();
       $data = $env->data();
       if(!($morceau = $data->source($_GET[$env->param("id")], true))){
         $env->erreur("Impossible de lire les informations du morceau");
         return;
       }
       if
-      (    isset($_GET[$env->param("id")])
-        && isset($_GET[$env->param("xml")])
-        && ($_GET[$env->param("xml")] == "derviation" ? isset($_GET[$env->param("derivation")]) : true)
+      (    !isset($_GET[$env->param("id")])
+        || !isset($_GET[$env->param("xml")])
+        || ($_GET[$env->param("xml")] == "derviation" && !isset($_GET[$env->param("derivation")]))
       ){
         $env->erreur("parametre de fichier xml manquant");
         return;