[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/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")) {
14 return;
15 }
16
17 function urls_generer_url_forum_dist($id_forum, $args = '', $ancre = '') {
18 if ($id_forum = intval($id_forum)) {
19 include_spip('inc/forum');
20 list($type, $id, ) = racine_forum($id_forum);
21 if ($type) {
22 if (!$ancre) {
23 $ancre = "forum$id_forum";
24 }
25
26 return generer_url_entite($id, $type, $args, $ancre, true);
27 }
28 }
29
30 return '';
31 }