changeset 3507:792fd08a05b6

macro.EmbedObject: bug fix for missing movie param see MoinMoinBugs/EmbedObjectMissesToEmitParamMovie and emitting param values of "False" too.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 15 Apr 2008 10:13:23 +0200
parents 6b6851d0a3c8
children da1d5a2165f5
files MoinMoin/macro/EmbedObject.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/EmbedObject.py	Mon Apr 14 23:00:59 2008 +0200
+++ b/MoinMoin/macro/EmbedObject.py	Tue Apr 15 10:13:23 2008 +0200
@@ -38,6 +38,10 @@
     @param value: the value
     @param valuetype: the type of the value
     """
+    # Because plugins do have different defaults we have to write "False" too.
+    if isinstance(value, bool):
+        value = str(value)
+
     if value:
         return '''
 <param name="%(param)s" value="%(value)s" valuetype="%(valuetype)s">''' % {"param": param,
@@ -197,14 +201,15 @@
             height = height or '800px'
 
         embed_src = '''
-<object %(ob_data)s %(ob_type)s  %(ob_width)s %(ob_height)s %(ob_align)s>
-%(quality)s%(wmode)s%(autostart)s%(play)s%(loop)s%(menu)s<p>%(alt)s</p>
+<object %(ob_data)s %(ob_type)s %(ob_width)s %(ob_height)s %(ob_align)s>
+%(movie)s%(quality)s%(wmode)s%(autostart)s%(play)s%(loop)s%(menu)s<p>%(alt)s</p>
 </object>''' % {
     "ob_data": _check_object_value("data", url),
     "ob_width": _check_object_value("width", width),
     "ob_height": _check_object_value("height", height),
     "ob_type": _check_object_value("type", mime_type),
     "ob_align": _check_object_value("align", align),
+    "movie": _check_param_value("movie", url, "data"),
     "quality": _check_param_value("quality", quality, "data"),
     "wmode": _check_param_value("wmode", wmode, "data"),
     "autostart": _check_param_value("autostart", autostart, "data"),