File "generer_url_ecrire_forum.php"

Full path: /home/argothem/www/v4_old/plugins-dist/forum/urls/generer_url_ecrire_forum.php
File size: 1.2 KB
MIME-type: text/x-php
Charset: utf-8

<?php

/***************************************************************************\
 *  SPIP, Système de publication pour l'internet                           *
 *                                                                         *
 *  Copyright © avec tendresse depuis 2001                                 *
 *  Arnaud Martin, Antoine Pitrou, Philippe Rivière, Emmanuel Saint-James  *
 *                                                                         *
 *  Ce programme est un logiciel libre distribué sous licence GNU/GPL.     *
 *  Pour plus de détails voir le fichier COPYING.txt ou l'aide en ligne.   *
\***************************************************************************/

if (!defined('_ECRIRE_INC_VERSION')) {
	return;
}

function urls_generer_url_ecrire_forum_dist($id, $args = '', $ancre = '', $public = null, $connect = '') {
	$a = 'id_forum=' . intval($id);
	if (is_null($public) and !$connect) {
		$public = objet_test_si_publie('forum', $id, $connect);
	}
	$h = ($public or $connect)
		? generer_objet_url_absolue($id, 'forum', $args, $ancre, $connect)
		: (generer_url_ecrire('controler_forum', "debut_forum=@$id" . ($args ? "&$args" : ''))
			. ($ancre ? "#$ancre" : ''));

	return $h;
}