| Line 86... |
Line 86... |
| 86 |
|
86 |
|
| 87 |
// Analyse du poids de cette page vis à vis des données
|
87 |
// Analyse du poids de cette page vis à vis des données
|
| 88 |
$tab_champs_a_visiter = array('surtitre', 'titre', 'soustitre', 'descriptif', 'chapo', 'texte', 'ps');
|
88 |
$tab_champs_a_visiter = array('surtitre', 'titre', 'soustitre', 'descriptif', 'chapo', 'texte', 'ps');
|
| 89 |
foreach ($tab_champs_a_visiter as $val) {
|
89 |
foreach ($tab_champs_a_visiter as $val) {
|
| 90 |
// Vérification que le champ existe et contient quelque chose
|
90 |
// Vérification que le champ existe et contient quelque chose
|
| 91 |
if (isset($Article->$val) && $Article->$val != '') {
|
91 |
if (isset($Article->$val) && !empty($Article->$val)) {
|
| 92 |
$aso_resultat['poids'] += $this->retournerOccurenceMotif($motif, $Article->$val);
|
92 |
$aso_resultat['poids'] += $this->retournerOccurenceMotif($motif, $Article->$val);
|
| 93 |
}
|
93 |
}
|
| Line 94... |
Line 94... |
| 94 |
}
|
94 |
}
|
| 95 |
|
95 |
|
| 96 |
if ($aso_resultat['poids'] > 0) {
|
96 |
if ($aso_resultat['poids'] > 0) {
|
| 97 |
// Création de l'url
|
97 |
// Création de l'url
|
| 98 |
$aso_resultat['url_simple'] = $url_base.'article'.$article_id.'.html';
|
98 |
$aso_resultat['url_simple'] = $url_base.'article'.$article_id.'.html';
|
| 99 |
$aso_resultat['url'] = $aso_resultat['url_simple'].'?var_recherche='.More_Recherche::traiterMotif($motif, 'url');
|
99 |
$aso_resultat['url'] = $aso_resultat['url_simple'].'?var_recherche='.More_Recherche::traiterMotif($motif, 'url');
|
| 100 |
|
100 |
|
| 101 |
// Récupération du titre de la page
|
101 |
// Récupération du titre de la page
|
| 102 |
if (trim($Article->titre) != '') {
|
102 |
if (trim($Article->titre)) {
|
| 103 |
$aso_resultat['titre'] = htmlentities($Article->titre);
|
103 |
$aso_resultat['titre'] = htmlentities($Article->titre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15');
|
| 104 |
} else if (trim($Article->surtitre) != '') {
|
104 |
} else if (trim($Article->surtitre)) {
|
| 105 |
$aso_resultat['titre'] = htmlentities($Article->surtitre);
|
105 |
$aso_resultat['titre'] = htmlentities($Article->surtitre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15');
|
| 106 |
} else if (trim($Article->soustitre) != '') {
|
106 |
} else if (trim($Article->soustitre)) {
|
| - |
|
107 |
$aso_resultat['titre'] = htmlentities($Article->soustitre, ENT_COMPAT|ENT_HTML401, 'ISO8859-15');
|
| 107 |
$aso_resultat['titre'] = htmlentities($Article->soustitre);
|
108 |
}
|
| Line 108... |
Line 109... |
| 108 |
}
|
109 |
|
| Line 109... |
Line 110... |
| 109 |
$aso_resultat['hreflang'] = htmlentities($Article->lang);
|
110 |
$aso_resultat['hreflang'] = htmlentities($Article->lang, ENT_COMPAT|ENT_HTML401, 'ISO8859-15');
|
| 110 |
|
111 |
|