3 class mw_users_sources extends mw_controller{
5 public function validate(){
6 return "Controleur interne - appel interne uniquement";
9 public function get_source_from_xml(&$env, $xml_url, $xml_content, $xml_use_edit_content){
11 $source = $data->empty_source();
14 "content" => $xml_content,
15 "use_edit_content" => $xml_use_edit_content
17 if($source_xml["url"]){
18 if($source_xml["content"]){
21 $source = $data->source_xml_read(
23 $source_xml["content"]
27 $source = $data->empty_source();
29 "Code XML invalide pour :"
30 ."<br /><strong>".$source_xml["url"]."</strong>"
35 if($source_xml["content"] === false){
37 "Impossible de lire le contenu du fichier XML pour :"
38 ."<br /><strong>".$source_xml["url"]."</strong>"
43 "Le contenu du fichier XML est vide pour :"
44 ."<br /><strong>".$source_xml["url"]."</strong>"
50 $env->message("Merci de préciser l'ULR du fichier XML");
52 $source["xml"] = $source_xml;