[SPIP] ~v3.0.20-->v3.0.25
[lhc/web/clavette_www.git] / www / plugins-dist / forum / urls / generer_url_forum.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13 if (!defined("_ECRIRE_INC_VERSION")) return;
14
15 function urls_generer_url_forum_dist($id_forum, $args='', $ancre='') {
16 if ($id_forum = intval($id_forum)) {
17 include_spip('inc/forum');
18 list($type, $id,) = racine_forum($id_forum);
19 if ($type) {
20 if (!$ancre) $ancre = "forum$id_forum";
21 return generer_url_entite($id, $type, $args, $ancre, true);
22 }
23 }
24 return '';
25 }
26
27 ?>