X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fcontrollers%2Fusers%2Fpistes.php;h=c1a70dfbfffa69b74ba2f22ef41b82e37b5c22f2;hb=f58d0d306acdf88245f47573bf78dc5497aa03d7;hp=0b2d177af68c5cd6f2674ee9b6c4f6345a9fe1c1;hpb=b2437852f60b76e437950c0458149d92686ee38b;p=mw_sourceml diff --git a/app/controllers/users/pistes.php b/app/controllers/users/pistes.php index 0b2d177..c1a70df 100644 --- a/app/controllers/users/pistes.php +++ b/app/controllers/users/pistes.php @@ -150,7 +150,21 @@ $upload_dir = $env->path("content")."uploads/".$this->user["id"]; $_SESSION["upload_dir"] = $web_path.($web_path ? "" : "/").$env->path("content")."uploads/".$this->user["id"]; $users_sources_mod = $env->get_controller("users/sources"); - if($_POST){ + if(isset($_POST["button_derive"])){ + if( + ($origin_source_id = $_POST["button_derive"]) + && ($origin_source_xml_url = $data->source_xml_url($origin_source_id)) + && ($origin_source_xml_content = $data->get_source_xml($origin_source_id)) + ){ + $piste["derivations"][$origin_source_id] = $users_sources_mod->get_source_from_xml( + $env, + $origin_source_xml_url, + $origin_source_xml_content, + true + ); + } + } + elseif($_POST){ if(!($groupe = $data->groupe($_POST["id_groupe"]))){ $env->erreur("Impossible de lire les informations du groupe"); return;