diff --git a/ecrire/inc/texte.php b/ecrire/inc/texte.php index 199201e7670ca29993c508d7c647649a3683ee91..f12fa068a9a1eca7b2c9ccf23431c64fdc469336 100644 --- a/ecrire/inc/texte.php +++ b/ecrire/inc/texte.php @@ -756,10 +756,10 @@ function calculer_url_rubrique($id, $texte='') function calculer_url_mot($id, $texte='') { $lien = generer_url_mot($id); - $row = @spip_fetch_array(spip_query("SELECT titre,lang FROM spip_mots WHERE id_mot=$id")); + $row = @spip_fetch_array(spip_query("SELECT titre FROM spip_mots WHERE id_mot=$id")); if ($texte=='') $texte = supprimer_numero($row['titre']); - return array($lien, 'spip_in', $texte, $row['lang']); + return array($lien, 'spip_in', $texte); } // http://doc.spip.org/@calculer_url_breve @@ -810,6 +810,19 @@ function calculer_url_site($id, $texte='') return array($lien, 'spip_out', $texte, $row['lang']); } +// http://doc.spip.org/@calculer_url_site +function calculer_url_forum($id, $texte='') +{ + $lien = generer_url_forum($id); + if ($texte=='') { + $row = @spip_fetch_array(spip_query("SELECT titre FROM spip_forum WHERE id_forum=$id AND statut='publie'")); + if ($texte=='') + $texte = $row['titre']; + } + return array($lien, 'spip_in', $texte); # pas de hreflang +} + + // // Tableaux //