﻿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].

I 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:
{{{
#!diff
Index: wikitablemacro/0.11/wikitable/table.py
===================================================================
--- wikitablemacro/0.11/wikitable/table.py	(revision 12447)
+++ wikitablemacro/0.11/wikitable/table.py	(working copy)
@@ -33,10 +33,12 @@
     
     # Render macro
     
-    def render_macro(self, req, name, content):
+    def expand_macro(self, formatter, name, content):
         db = self.env.get_db_cnx()
         cursor = db.cursor()
         cursor.execute(content)
+
+        req = formatter.req
         
         out = StringIO()
}}}

{{{
#!diff
Index: wikitablemacro/0.11/wikitable/scalar.py
===================================================================
--- wikitablemacro/0.11/wikitable/scalar.py	(revision 12447)
+++ wikitablemacro/0.11/wikitable/scalar.py	(working copy)
@@ -23,7 +23,7 @@
     
     # Render macro
     
-    def render_macro(self, req, name, content):
+    def expand_macro(self, formatter, name, content):
         db = self.env.get_db_cnx()
         cursor = db.cursor()
         cursor.execute(content)
@@ -36,5 +36,5 @@
 	out = StringIO() 
 	print >>out, u""<span class='wikiscalar'>%s</span>"" % value
 
-        add_stylesheet(req, 'wikitable/css/wikitable.css')
+        add_stylesheet(formatter.req, 'wikitable/css/wikitable.css')
         return Markup(out.getvalue())
}}}",enhancement,closed,normal,WikiTableMacro,normal,fixed,,hasienda,1.0
