[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / urls / generer_url_forum.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
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 /**
16 * Duplicata de la fonction disponible dans _core_/forum/urls
17 * pour permettre l'utilisation du plugin urls_etendues avec spip 2.0
18 * A retirer a la release 2.1
19 *
20 * @param <type> $id_forum
21 * @param <type> $args
22 * @param <type> $ancre
23 * @return <type>
24 */
25 function urls_generer_url_forum_dist($id_forum, $args='', $ancre='') {
26 if ($id_forum = intval($id_forum)) {
27 include_spip('inc/forum');
28 list($type, $id,) = racine_forum($id_forum);
29 if ($type) {
30 if (!$ancre) $ancre = "forum$id_forum";
31 return generer_url_entite($id, $type, $args, $ancre, true);
32 }
33 }
34 return '';
35 }
36
37 ?>