X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=app%2Fdata%2Fmodules%2Fshare%2Fsml_data_sources_xml_format.php;h=676262abc502e55b2ee6ff36aaefc92e2f5092c7;hb=37049b502efdf68a562ce63d8f37a820c66bc887;hp=320ecee342af9af313b1a64118f42759a85a35c6;hpb=b54e7a0b72982b396436dd47189b3520dd3f0b5e;p=mw_sourceml diff --git a/app/data/modules/share/sml_data_sources_xml_format.php b/app/data/modules/share/sml_data_sources_xml_format.php index 320ecee..676262a 100644 --- a/app/data/modules/share/sml_data_sources_xml_format.php +++ b/app/data/modules/share/sml_data_sources_xml_format.php @@ -20,6 +20,9 @@ if($this->status !== false){ $this->source = isset($params["source"]) ? $params["source"] : $this->source($id, true); if($this->source !== false){ + if($this->source["reference"]){ + return $this->source["reference"]["xml"]["content"]; + } if($this->source["groupes"]) $this->groupes = $this->source["groupes"]; if(isset($params["groupes"])) $this->groupes = $params["groupes"]; if(!isset($this->groupes)) $this->groupes = $this->source_groupes($id); @@ -30,10 +33,10 @@ $content = "\n"; if($this->source["derivations"]){ foreach($this->source["derivations"] as $id_derivation => $derivation){ - $content .= " \n"; + $content .= " \n"; } } - if($this->source["reference"]) $content .= " source["reference"]["xml"]["url"]."\" />\n"; + if($this->source["reference"]) $content .= " source["reference"]["xml"]["url"]."\" />\n"; else{ $content .= " <![CDATA[".$this->source["titre"]."]]>\n" @@ -201,7 +204,7 @@ elseif($key == "derivated_from"){ $source["derivations"][] = array( "xml" => array( - "url" => $value[0]["attrs"]["href"], + "url" => $value[0]["attrs"]["src"], "content" => "", "use_edit_content" => false ) @@ -210,7 +213,7 @@ elseif($key == "reference"){ $source["reference"] = array( "xml" => array( - "url" => $value[0]["attrs"]["href"], + "url" => $value[0]["attrs"]["src"], "content" => "", "use_edit_content" => false )