Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
scrutaridata:impl:mediawiki [2009/06/02 19:52] vincentscrutaridata:impl:mediawiki [2016/07/06 18:38] (Version actuelle) – [class-MediawikiScrutariDataWriter.php] vincent
Ligne 17: Ligne 17:
  
 class MediawikiScrutariDataWriter { class MediawikiScrutariDataWriter {
-private $uuid;+private $authority;
 private $baseName; private $baseName;
 private $baseIcon; private $baseIcon;
Ligne 28: Ligne 28:
 private $hrefParent; private $hrefParent;
  
-public function setUuid($uuid) { +public function setAuthority($authority) { 
-$this->uuid = $uuid;+$this->authority = $authority;
 } }
  
Ligne 69: Ligne 69:
  
 public function writeScrutariData($file) { public function writeScrutariData($file) {
- $xmlWriter = new UtilXmlWriter($file); +    $xmlWriter = new UtilXmlWriter($file); 
- $xmlWriter->appendDeclaration(); +    $xmlWriter->appendDeclaration(); 
- $xmlWriter->openTag("base"); +    $xmlWriter->openTag("base"); 
- $xmlWriter->openTag("base-metadata"); +    $xmlWriter->openTag("base-metadata"); 
- $xmlWriter->addElement("authority-uuid",$this->uuid); +    $xmlWriter->addElement("authority",$this->authority); 
- $xmlWriter->addElement("base-name",$this->baseName); +    $xmlWriter->addElement("base-name",$this->baseName); 
- $xmlWriter->addElement("base-icon",$this->baseIcon); +    $xmlWriter->addElement("base-icon",$this->baseIcon); 
- $xmlWriter->openTag("intitule-short"); +    $xmlWriter->openTag("intitule-short"); 
- $xmlWriter->addLibElement($this->lang,$this->baseIntituleShort); +    $xmlWriter->addLibElement($this->lang,$this->baseIntituleShort); 
- $xmlWriter->closeTag("intitule-short"); +    $xmlWriter->closeTag("intitule-short"); 
- $xmlWriter->openTag("intitule-long"); +    $xmlWriter->openTag("intitule-long"); 
- $xmlWriter->addLibElement($this->lang,$this->baseIntituleLong); +    $xmlWriter->addLibElement($this->lang,$this->baseIntituleLong); 
- $xmlWriter->closeTag("intitule-long"); +    $xmlWriter->closeTag("intitule-long"); 
- $xmlWriter->openTag("langs-ui"); +    $xmlWriter->openTag("langs-ui"); 
- $xmlWriter->addElement("lang",$this->lang); +    $xmlWriter->addElement("lang",$this->lang); 
- $xmlWriter->closeTag("langs-ui"); +    $xmlWriter->closeTag("langs-ui"); 
- $xmlWriter->closeTag("base-metadata"); +    $xmlWriter->closeTag("base-metadata"); 
-  +     
- $xmlWriter->write("<corpus corpus-name=\""); +    $xmlWriter->write("<corpus corpus-name=\""); 
- $xmlWriter->write($this->corpusName); +    $xmlWriter->write($this->corpusName); 
- $xmlWriter->write("\">"); +    $xmlWriter->write("\">"); 
- $xmlWriter->openTag("corpus-metadata"); +    $xmlWriter->openTag("corpus-metadata"); 
- $xmlWriter->openTag("intitule-corpus"); +    $xmlWriter->openTag("intitule-corpus"); 
- $xmlWriter->addLibElement($this->lang,$this->corpusIntituleCorpus); +    $xmlWriter->addLibElement($this->lang,$this->corpusIntituleCorpus); 
- $xmlWriter->closeTag("intitule-corpus"); +    $xmlWriter->closeTag("intitule-corpus"); 
- $xmlWriter->openTag("intitule-fiche"); +    $xmlWriter->openTag("intitule-fiche"); 
- $xmlWriter->addLibElement($this->lang,$this->corpusIntituleFiche); +    $xmlWriter->addLibElement($this->lang,$this->corpusIntituleFiche); 
- $xmlWriter->closeTag("intitule-fiche"); +    $xmlWriter->closeTag("intitule-fiche"); 
- $xmlWriter->addElement("type","CNC"); +    $xmlWriter->addElement("type","CNC"); 
- $xmlWriter->addElement("href-parent",$this->hrefParent); +    $xmlWriter->addElement("href-parent",$this->hrefParent); 
- $xmlWriter->closeTag("corpus-metadata");+    $xmlWriter->closeTag("corpus-metadata");
  
- $requete = "SELECT page_id,page_title FROM page WHERE page_namespace=0 AND page_is_redirect != 1 ORDER BY page_id"; +    $requete = "SELECT page_id,page_title FROM page WHERE page_namespace=0 AND page_is_redirect != 1 ORDER BY page_id"; 
-  +     
- $resultat = mysql_query($requete); +    $resultat = mysql_query($requete); 
-  +     
- while($row = mysql_fetch_row($resultat)) { +    while($row = mysql_fetch_row($resultat)) { 
- $page_id = $row[0]; +        $page_id = $row[0]; 
- $page_title = $row[1]; +        $page_title = $row[1]; 
- $xmlWriter->write("<fiche fiche-id=\""); +        $xmlWriter->write("<fiche fiche-id=\""); 
- $xmlWriter->write($page_id); +        $xmlWriter->write($page_id); 
- $xmlWriter->write("\">"); +        $xmlWriter->write("\">"); 
- $titre = str_replace("_"," ",$page_title); +        $titre = str_replace("_"," ",$page_title); 
- $xmlWriter->addElement("titre",$titre); +        $xmlWriter->addElement("titre",$titre); 
- $xmlWriter->addElement("lang",$this->lang); +        $xmlWriter->addElement("lang",$this->lang); 
- $href = rawurlencode($page_title); +        $href = rawurlencode($page_title); 
- $xmlWriter->addElement(href,$href); +        $xmlWriter->addElement(href,$href); 
- $xmlWriter->closeTag("fiche"); +        $xmlWriter->closeTag("fiche"); 
-+    
-  +     
- $xmlWriter->closeTag("corpus"); +    $xmlWriter->closeTag("corpus"); 
- $xmlWriter->closeTag("base");+    $xmlWriter->closeTag("base");
 } }
  
scrutaridata/impl/mediawiki.1243965156.txt.gz · Dernière modification : 2009/12/17 11:26 (modification externe)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0