From 3d63dbcb08b650915c1e2cbb29c4f7ca73db795a Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 25 Sep 2010 15:19:18 +0000
Subject: [PATCH] generaliser generer_url_entite

---
 ecrire/inc/utils.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index 8b9b388025..dc6c4b01f5 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -868,7 +868,7 @@ function tester_url_ecrire($nom){
 function generer_url_entite($id='', $entite='', $args='', $ancre='', $public=NULL, $type=NULL)
 {
 	if ($public === NULL) $public = !test_espace_prive();
-	if ($entite=='syndic') $entite='site'; // cas particulier d'appels sur objet/id_objet...
+	$entite = objet_type($entite); // cas particulier d'appels sur objet/id_objet...
 
 	if (!$public) {
 		if (!$entite) return '';
-- 
GitLab