8aa8fec379d6a29872051c8d49153048a320276f
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2016 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
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 \***************************************************************************/
13 if (!defined("_ECRIRE_INC_VERSION")) {
17 // https://code.spip.net/@generer_url_ecrire_forum
18 function urls_generer_url_ecrire_forum_dist($id, $args = '', $ancre = '', $public = null, $connect = '') {
19 $a = "id_forum=" . intval($id);
20 if (is_null($public) and !$connect) {
21 $public = objet_test_si_publie('forum', $id, $connect);
23 $h = ($public or $connect)
24 ?
generer_url_entite_absolue($id, 'forum', $args, $ancre, $connect)
25 : (generer_url_ecrire('controler_forum', "debut_forum=@$id" . ($args ?
"&$args" : ''))
26 . ($ancre ?
"#$ancre" : ''));