For each wanted page list the page on which it is referenced
|Reported by:||Owned by:||Justin Francis|
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.py =================================================================== --- wanted_pages/wanted_pages.py (revision 2103) +++ wanted_pages/wanted_pages.py (working copy) @@ -49,9 +49,16 @@
pages = self.findBrokenLinks(texts, req).values()
+ 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)