88,7 → 88,7 |
$tab_champs_a_visiter = array('surtitre', 'titre', 'soustitre', 'descriptif', 'chapo', 'texte', 'ps'); |
foreach ($tab_champs_a_visiter as $val) { |
// Vérification que le champ existe et contient quelque chose |
if (isset($Article->$val) && $Article->$val != '') { |
if (isset($Article->$val) && !empty($Article->$val)) { |
$aso_resultat['poids'] += $this->retournerOccurenceMotif($motif, $Article->$val); |
} |
} |
97,16 → 97,17 |
// Création de l'url |
$aso_resultat['url_simple'] = $url_base.'article'.$article_id.'.html'; |
$aso_resultat['url'] = $aso_resultat['url_simple'].'?var_recherche='.More_Recherche::traiterMotif($motif, 'url'); |
|
|
// Récupération du titre de la page |
if (trim($Article->titre) != '') { |
$aso_resultat['titre'] = htmlentities($Article->titre); |
} else if (trim($Article->surtitre) != '') { |
$aso_resultat['titre'] = htmlentities($Article->surtitre); |
} else if (trim($Article->soustitre) != '') { |
$aso_resultat['titre'] = htmlentities($Article->soustitre); |
if (trim($Article->titre)) { |
$aso_resultat['titre'] = htmlentities($Article->titre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15'); |
} else if (trim($Article->surtitre)) { |
$aso_resultat['titre'] = htmlentities($Article->surtitre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15'); |
} else if (trim($Article->soustitre)) { |
$aso_resultat['titre'] = htmlentities($Article->soustitre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15'); |
} |
$aso_resultat['hreflang'] = htmlentities($Article->lang); |
|
$aso_resultat['hreflang'] = htmlentities($Article->lang, ENT_COMPAT|ENT_HTML401, 'ISO8859-15'); |
|
$aso_resultat['description'] = More_Recherche::couperTexte($Article->texte, MORE_RESULTAT_TAILLE_DESCRIPTION); |
|