From ca90ba79caa7bac43cbfeb701eeb9649f412486b Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Fri, 4 Jan 2008 23:32:25 +0000
Subject: [PATCH] des (sans titre) manquants quand le titre des sites manquait

---
 ecrire/exec/sites.php          | 2 +-
 ecrire/inc/afficher_objets.php | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ecrire/exec/sites.php b/ecrire/exec/sites.php
index 03388d12fb..65914a3397 100644
--- a/ecrire/exec/sites.php
+++ b/ecrire/exec/sites.php
@@ -115,7 +115,7 @@ function afficher_site($id_syndic, $id_rubrique, $nom_site, $row){
 
 	$haut =
 		"<div class='bandeau_actions'>$actions</div>".
-		gros_titre($nom_site, '' , false)
+		gros_titre($nom_site?$nom_site:"("._T('info_sans_titre_2').")", '' , false)
 	  . "<a href='$url_site' class='url_site'>$url_affichee</a>";
 
 	$onglet_contenu = 
diff --git a/ecrire/inc/afficher_objets.php b/ecrire/inc/afficher_objets.php
index 0fc173442a..489b21d6ac 100644
--- a/ecrire/inc/afficher_objets.php
+++ b/ecrire/inc/afficher_objets.php
@@ -90,9 +90,9 @@ function afficher_titre_objet($type,$row){
 	if (function_exists($f = "afficher_titre_$type"))
 		return $f($row);
 
-	$titre = isset($row['titre'])?sinon($row['titre'], _T('ecrire:info_sans_titre')):
-	(isset($row['nom'])?sinon($row['nom'], _T('ecrire:info_sans_titre')):
-	 (isset($row['nom_email'])?sinon($row['nom_email'], _T('ecrire:info_sans_titre')):
+	$titre = isset($row['titre'])?sinon($row['titre'], "("._T('info_sans_titre_2').")"):
+	(isset($row['nom'])?sinon($row['nom'], "("._T('info_sans_titre_2').")"):
+	 (isset($row['nom_email'])?sinon($row['nom_email'], "("._T('info_sans_titre_2').")"):
 	  ""));
 	return array(typo(supprime_img($titre,'')),'');
 }
@@ -100,7 +100,7 @@ function afficher_titre_objet($type,$row){
 function afficher_titre_site($row){
 	$syndication = $row['syndication'];
 	$s = "";
-	$s .= typo($row['nom_site']);
+	$s .= $row['nom_site']?typo($row['nom_site']):"("._T('info_sans_titre_2').")";
 	$s2 = "&nbsp;&nbsp; <span class='spip_xx-small'>[<a href='"
 	.$row['url_site']."'>"._T('lien_visite_site')."</a>]</span>";
 	
-- 
GitLab