attribut src au lieu de href pour les sources sourceml.1.0.1
authorroot <root@dj3c1t.net>
Sat, 26 Oct 2013 15:42:41 +0000 (17:42 +0200)
committerroot <root@dj3c1t.net>
Sat, 26 Oct 2013 15:42:41 +0000 (17:42 +0200)
app/data/modules/share/sml_data_sources_xml_format.php
app/out/default/views/content/sources/xml_form.php

index 320ecee..ae67cab 100644 (file)
                 $content = "<source>\n";
                 if($this->source["derivations"]){
                   foreach($this->source["derivations"] as $id_derivation => $derivation){
-                    $content .= "  <derivated_from href=\"".$derivation["xml"]["url"]."\" />\n";
+                    $content .= "  <derivated_from src=\"".$derivation["xml"]["url"]."\" />\n";
                   }
                 }
-                if($this->source["reference"]) $content .= "  <reference href=\"".$this->source["reference"]["xml"]["url"]."\" />\n";
+                if($this->source["reference"]) $content .= "  <reference src=\"".$this->source["reference"]["xml"]["url"]."\" />\n";
                 else{
                   $content .=
                    "  <title><![CDATA[".$this->source["titre"]."]]></title>\n"
         elseif($key == "derivated_from"){
           $source["derivations"][] = array(
             "xml" => array(
-              "url" => $value[0]["attrs"]["href"],
+              "url" => $value[0]["attrs"]["src"],
               "content" => "",
               "use_edit_content" => false
             )
         elseif($key == "reference"){
           $source["reference"] = array(
             "xml" => array(
-              "url" => $value[0]["attrs"]["href"],
+              "url" => $value[0]["attrs"]["src"],
               "content" => "",
               "use_edit_content" => false
             )
index faa21c2..48cab50 100644 (file)
@@ -90,7 +90,7 @@
       Editer le contenu du fichier XML
       <input type="checkbox" class="use_edit_<?php echo $xml_name ?>_content" id="use_edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>" name="use_edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>"<?php echo $source["xml"]["use_edit_content"] ? " checked=\"checked\"" : "" ?> />
       <span<?php echo $source["xml"]["use_edit_content"] ? "" : " style=\"display:none\"" ?>>
-        <textarea name="edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>" id="edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>" cols="64" rows="15" wrap="off"><?php echo $source["xml"]["content"] ?></textarea>
+        <textarea name="edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>" id="edit_<?php echo $xml_name ?>_content<?php echo $xml_id_suffix ?>" cols="64" rows="15" wrap="off"><?php echo htmlentities($source["xml"]["content"]) ?></textarea>
       </span>
     </span>
   </div>