Commit fe337c4c authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent a8b528ab
...@@ -611,12 +611,7 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -611,12 +611,7 @@ class tx_nG6_pi1 extends tslib_pibase {
$content .= '<div id="img_dialog" title=""></div>'; $content .= '<div id="img_dialog" title=""></div>';
$content .= '<div'.$this->pi_classParam('singleView').'><h2>Analyse '.$this->internal['currentRow']['name'].' : <span>'.$this->getFieldContent('description').'</span></h2></div>'; $content .= '<div'.$this->pi_classParam('singleView').'><h2>Analyse '.$this->internal['currentRow']['name'].' : <span>'.$this->getFieldContent('description').'</span></h2></div>';
if (file_exists($this->conf['data'].$this->internal['currentRow']['directory'].'/index.html' )) { if (file_exists($this->conf['data'].$this->internal['currentRow']['directory'].'/analyse.xml' )) {
$fp = fopen((string)$this->conf['data'].$this->internal['currentRow']['directory'].'/index.html',"r"); //lecture du fichier
while (!feof($fp)) { //on parcourt toutes les lignes
$content .= fgets($fp, 4096); // lecture du contenu de la ligne
}
} else if (file_exists($this->conf['data'].$this->internal['currentRow']['directory'].'/analyse.xml' )) {
$xml = new DomDocument; $xml = new DomDocument;
$xml->load($this->conf['data'].$this->internal['currentRow']['directory'].'/analyse.xml'); $xml->load($this->conf['data'].$this->internal['currentRow']['directory'].'/analyse.xml');
...@@ -630,11 +625,25 @@ class tx_nG6_pi1 extends tslib_pibase { ...@@ -630,11 +625,25 @@ class tx_nG6_pi1 extends tslib_pibase {
if ($class_value == "") { if ($class_value == "") {
$content .= $this->getFieldHeader('uncorrect_xml'); $content .= $this->getFieldHeader('uncorrect_xml');
} else { } else {
$xslt = new XSLTProcessor();
$xsl = new DOMDocument(); $xslt = new XSLTProcessor();
$xsl->load( 'typo3conf/ext/nG6/res/xsl/'.$this->LLkey.'.'.$class_value.'.xsl', LIBXML_NOCDATA); $xsl = new DOMDocument();
$xslt->importStylesheet( $xsl ); if (file_exists(PATH_typo3conf.ext.'/'.$this->extKey.'/res/xsl/'.$this->LLkey.'.'.$class_value.'.xsl')) {
$content .= $xslt->transformToXML( $xml ); $xsl->load( 'typo3conf/ext/'.$this->extKey.'/res/xsl/'.$this->LLkey.'.'.$class_value.'.xsl', LIBXML_NOCDATA);
$xslt->importStylesheet( $xsl );
$content .= $xslt->transformToXML( $xml );
} else if (file_exists(PATH_typo3conf.ext.'/'.$this->extKey.'/res/xsl/default.'.$class_value.'.xsl')) {
$xsl->load( 'typo3conf/ext/'.$this->extKey.'/res/xsl/default.'.$class_value.'.xsl', LIBXML_NOCDATA);
$xslt->importStylesheet( $xsl );
$content .= $xslt->transformToXML( $xml );
} else {
$content .= $this->getFieldHeader('no_xsl_found');
}
}
} else if (file_exists($this->conf['data'].$this->internal['currentRow']['directory'].'/index.html' )) {
$fp = fopen((string)$this->conf['data'].$this->internal['currentRow']['directory'].'/index.html',"r"); //lecture du fichier
while (!feof($fp)) { //on parcourt toutes les lignes
$content .= fgets($fp, 4096); // lecture du contenu de la ligne
} }
} else { } else {
$content .= $this->getFieldHeader('not_synchro'); $content .= $this->getFieldHeader('not_synchro');
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<label index="listFieldHeader_not_synchro">Results folder not synchronized yet</label> <label index="listFieldHeader_not_synchro">Results folder not synchronized yet</label>
<label index="listFieldHeader_not_authorized">Access denied - You are not authorized to access this page.</label> <label index="listFieldHeader_not_authorized">Access denied - You are not authorized to access this page.</label>
<label index="listFieldHeader_uncorrect_xml">The xml analyse file is not well formated.</label> <label index="listFieldHeader_uncorrect_xml">The xml analyse file is not well formated.</label>
<label index="listFieldHeader_no_xsl_found">No xsl file found for this analyse.</label>
<label index="back">Back</label> <label index="back">Back</label>
<label index="pi_list_browseresults_prev">&lt; Previous</label> <label index="pi_list_browseresults_prev">&lt; Previous</label>
<label index="pi_list_browseresults_page">Page</label> <label index="pi_list_browseresults_page">Page</label>
...@@ -60,6 +61,7 @@ ...@@ -60,6 +61,7 @@
<label index="listFieldHeader_not_synchro">Le r&amp;eacute;pertoire de r&amp;eacute;sultats n'est pas encore synchronis&amp;eacute;</label> <label index="listFieldHeader_not_synchro">Le r&amp;eacute;pertoire de r&amp;eacute;sultats n'est pas encore synchronis&amp;eacute;</label>
<label index="listFieldHeader_not_authorized">Acc&amp;egrave;s refus&amp;eacute; - Vous n'avez pas les droits d'acc&amp;egrave;s &amp;agrave; cette page.</label> <label index="listFieldHeader_not_authorized">Acc&amp;egrave;s refus&amp;eacute; - Vous n'avez pas les droits d'acc&amp;egrave;s &amp;agrave; cette page.</label>
<label index="listFieldHeader_uncorrect_xml">Le fichier xml est incorrect.</label> <label index="listFieldHeader_uncorrect_xml">Le fichier xml est incorrect.</label>
<label index="listFieldHeader_no_xsl_found">Aucun fichier xsl pour cette analyse.</label>
<label index="back">Retour</label> <label index="back">Retour</label>
<label index="pi_list_browseresults_prev">&lt; Pr&amp;eacute;cedente</label> <label index="pi_list_browseresults_prev">&lt; Pr&amp;eacute;cedente</label>
<label index="pi_list_browseresults_page">Page</label> <label index="pi_list_browseresults_page">Page</label>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment