Ejemplo n.º 1
0
 /**
  * Redesign the content of the body you will index
  *
  * @param string $content The filename you want to index
  *
  * @return string
  */
 function getIndexableBody($content)
 {
     $body = " ";
     if (substr($this->file_type, 0, 6) == 'image/') {
         $body = $this->file_name;
     } else {
         switch ($this->file_type) {
             case 'text/osoft':
                 $body = $this->getBinaryContent();
                 $osoft_histo = new COsoftHistorique(false);
                 $body = $osoft_histo->toHTML($body);
                 $body = strip_tags($body);
                 break;
             case 'application/osoft':
                 $body = $this->getBinaryContent();
                 $osoft_dossier = new COsoftDossier(false);
                 $body = $osoft_dossier->toHTML($body);
                 $body = strip_tags($body);
                 break;
             default:
                 $wrapper = new CSearchFileWrapper($content, $this->_id);
                 $body = $wrapper->run();
         }
     }
     return $body;
 }
Ejemplo n.º 2
0
    }
}
$show_editor = true;
// Gestion des pages pour les Fichiers PDF et fichiers TXT
if ($fileSel && $elementClass == "CFile" && !$acces_denied) {
    if (file_exists($fileSel->_file_path)) {
        $raw_content = file_get_contents($fileSel->_file_path);
        switch ($fileSel->file_type) {
            case "application/x-hprim":
                $includeInfosFile = CHprim21::formatHPRIMBiologie($raw_content);
                $display_as_is = true;
                $show_editor = false;
                break;
            case "text/osoft":
                if (class_exists("COsoftHistorique")) {
                    $osoft_histo = new COsoftHistorique(false);
                    $includeInfosFile = $osoft_histo->toHTML($raw_content);
                    $show_editor = false;
                    break;
                }
            case "application/osoft":
                if (class_exists("COsoftDossier")) {
                    $osoft_dossier = new COsoftDossier(false);
                    $includeInfosFile = $osoft_dossier->toHTML($raw_content);
                    $show_editor = false;
                    break;
                }
            case "text/medistory-form":
                if (class_exists("CMedistoryImprime")) {
                    $includeInfosFile = CMedistoryImprime::toHTML($raw_content);
                    $show_editor = false;