11 | | http://github.com/dwc/dwc-overlay/blob/master/dev-python/trac-ticket-mover/files/trac-ticket-mover-sql-quoting.patch |
| 11 | {{{ |
| 12 | #!diff |
| 13 | Index: 0.11/ticketmoverplugin/ticketmover.py |
| 14 | =================================================================== |
| 15 | --- 0.11/ticketmoverplugin/ticketmover.py (revision 8362) |
| 16 | +++ 0.11/ticketmoverplugin/ticketmover.py (working copy) |
| 17 | @@ -188,7 +188,7 @@ |
| 18 | |
| 19 | # copy the changelog and attachment DBs |
| 20 | for table, _id in tables.items(): |
| 21 | - for row in get_all_dict(self.env, "SELECT * FROM %s WHERE %s=%s" % (table, _id, ticket_id)): |
| 22 | + for row in get_all_dict(self.env, "SELECT * FROM %s WHERE %s = '%s'" % (table, _id, ticket_id)): |
| 23 | row[_id] = new_ticket.id |
| 24 | insert_row_from_dict(env, table, row) |
| 25 | |
| 26 | }}} |