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
