id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
10718	[PATCH] make it working with Trac-1.0	falkb	rjollos	Trying today's SVN revision of this plugin I noticed it doesn't work with Trac 1.0, just strange errors like "... macro ... no longer supported ..." appear as desribed [https://groups.google.com/forum/?hl=en&fromgroups=#!topic/trac-users/MylvmlH-O5k here].\r\n\r\nI was able to fix it for me with the hint of hasienda. It works for me now on Trac-1.0.0. Here are my 2 little patches:\r\n{{{\r\n#!diff\r\nIndex: wikitablemacro/0.11/wikitable/table.py\r\n===================================================================\r\n--- wikitablemacro/0.11/wikitable/table.py_(revision 12447)\r\n+++ wikitablemacro/0.11/wikitable/table.py_(working copy)\r\n@@ -33,10 +33,12 @@\r\n     \r\n     # Render macro\r\n     \r\n-    def render_macro(self, req, name, content):\r\n+    def expand_macro(self, formatter, name, content):\r\n         db = self.env.get_db_cnx()\r\n         cursor = db.cursor()\r\n         cursor.execute(content)\r\n+\r\n+        req = formatter.req\r\n         \r\n         out = StringIO()\r\n}}}\r\n\r\n{{{\r\n#!diff\r\nIndex: wikitablemacro/0.11/wikitable/scalar.py\r\n===================================================================\r\n--- wikitablemacro/0.11/wikitable/scalar.py_(revision 12447)\r\n+++ wikitablemacro/0.11/wikitable/scalar.py_(working copy)\r\n@@ -23,7 +23,7 @@\r\n     \r\n     # Render macro\r\n     \r\n-    def render_macro(self, req, name, content):\r\n+    def expand_macro(self, formatter, name, content):\r\n         db = self.env.get_db_cnx()\r\n         cursor = db.cursor()\r\n         cursor.execute(content)\r\n@@ -36,5 +36,5 @@\r\n _out = StringIO() \r\n _print >>out, u"<span class='wikiscalar'>%s</span>" % value\r\n \r\n-        add_stylesheet(req, 'wikitable/css/wikitable.css')\r\n+        add_stylesheet(formatter.req, 'wikitable/css/wikitable.css')\r\n         return Markup(out.getvalue())\r\n}}}	enhancement	closed	normal	WikiTableMacro	normal	fixed		hasienda	1.0
