Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#1347 closed enhancement (duplicate)

For each wanted page list the page on which it is referenced

Reported by: Gregory Burd <gburd@…> Owned by: jfrancis
Priority: normal Component: WantedPagesMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10


Each item in the wanted pages list is a wiki term that does not yet have a page. I thought it would be nice to list the page or pages on which that term is used. This makes it much easier to go back and review the use of the term before creating the page. In some cases the term shouldn't really be a wiki term so this helps you find those mistaken terms and escape them with the '!' prefix.

Here is the patch:

Index: wanted_pages/ =================================================================== --- wanted_pages/ (revision 2103) +++ wanted_pages/ (working copy) @@ -49,9 +49,16 @@

pages = self.findBrokenLinks(texts, req).values()

wikiList =

+ referers =

pages.sort() for page in pages:

  • wikiList += (' * %s\n' % page)

+ referers = + db = self.env.get_db_cnx() + cursor = db.cursor() + cursor.execute("select name n from wiki where text like '%" + page + "%' and version = (select max(version) from wiki where name = n)") + for (name) in cursor: + referers += (' %s? ' % name) + wikiList += " * " + page + " (" + referers + ")\n"

return wiki_to_html(wikiList, self.env, req)

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by jfrancis

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the patch. I have added it to #714 and marked this as a duplicate of that ticket.

comment:2 Changed 3 years ago by rjollos

  • Component changed from WantedPagesPlugin to WantedPagesMacro

Renaming plugin from WantedPagesPlugin to WantedPagesMacro.

Add Comment

Modify Ticket

as closed The owner will remain jfrancis.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.