Modify ↓
Opened 12 years ago
Closed 12 years ago
#10718 closed enhancement (fixed)
[PATCH] make it working with Trac-1.0
Reported by: | falkb | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | WikiTableMacro |
Severity: | normal | Keywords: | |
Cc: | Steffen Hoffmann | Trac Release: | 1.0 |
Description
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 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:
-
wikitablemacro/0.11/wikitable/table.py
33 33 34 34 # Render macro 35 35 36 def render_macro(self, req, name, content):36 def expand_macro(self, formatter, name, content): 37 37 db = self.env.get_db_cnx() 38 38 cursor = db.cursor() 39 39 cursor.execute(content) 40 41 req = formatter.req 40 42 41 43 out = StringIO()
-
wikitablemacro/0.11/wikitable/scalar.py
23 23 24 24 # Render macro 25 25 26 def render_macro(self, req, name, content):26 def expand_macro(self, formatter, name, content): 27 27 db = self.env.get_db_cnx() 28 28 cursor = db.cursor() 29 29 cursor.execute(content) … … 36 36 out = StringIO() 37 37 print >>out, u"<span class='wikiscalar'>%s</span>" % value 38 38 39 add_stylesheet( req, 'wikitable/css/wikitable.css')39 add_stylesheet(formatter.req, 'wikitable/css/wikitable.css') 40 40 return Markup(out.getvalue())
Attachments (0)
Change History (3)
comment:1 Changed 12 years ago by
Status: | new → assigned |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
The patch looks great. I will commit it after I get some sleep :)