From a7b5c690da35b6268fc97228e53d1caa8e0e2ca9 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Fri, 30 Jun 2006 09:06:50 +0000
Subject: [PATCH] juste des commentaires et des espaces

---
 ecrire/inc/documents.php | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/ecrire/inc/documents.php b/ecrire/inc/documents.php
index 1fd9064fa8..6835824784 100644
--- a/ecrire/inc/documents.php
+++ b/ecrire/inc/documents.php
@@ -246,12 +246,12 @@ function parametrer_embed_document($fichier, $id_document, $hauteur, $largeur, $
 				}
 			}
 		}
-				
+
 		$params = "<param name='movie' value='$fichier' />\n"
 		  . "<param name='src' value='$fichier' />\n"
 		  . $inserer_vignette;
 
-	// Pour Flash
+		// Pour Flash
 		if ((!ereg("^controls", $les_parametres)) AND ($extension=='swf'))
 
 			return "<object "
@@ -260,8 +260,20 @@ function parametrer_embed_document($fichier, $id_document, $hauteur, $largeur, $
 			  . $params
 			  . "</object>\n";
 		else {
-			$emb = "<embed src='$fichier' $param_emb width='$largeur' height='$hauteur'></embed>\n";
-			if ($extension == 'svg') return $emb;
+			$emb = "<embed src='$fichier' $param_emb width='$largeur' height='$hauteur'>$alt</embed>\n";
+
+			// Cas particulier du SVG : pas d'object
+			if ($extension == 'svg')
+				return $emb;
+
+			/* 
+			// essai pour compatibilite descendante (helas ca ne marche pas)
+			// cf. http://www.yoyodesign.org/doc/w3c/svg1/backward.html
+			if ($extension == 'svg') return 
+			"<object type='image/svg+xml' data='$fichier'
+			$param_emb width='$largeur' height='$hauteur'>$alt</object>\n";
+			*/
+
 			return "<object width='$largeur' height='$hauteur'>\n"
 			  . $params
 			  . $emb
-- 
GitLab