changeset 2247:3f532c2cac83

Multiple names support for /+mychanges.
author Ashutosh Singla <ashu1461@gmail.com>
date Tue, 20 Aug 2013 19:57:45 +0530
parents f6fa7658535e
children 254b7d085447
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Tue Aug 20 19:39:23 2013 +0530
+++ b/MoinMoin/apps/frontend/views.py	Tue Aug 20 19:57:45 2013 +0530
@@ -862,13 +862,13 @@
     return render_template('link_list_no_item_panel.html',
                            title_name=_(u'My Changes'),
                            headline=_(u'My Changes'),
-                           item_names=my_changes
+                           fq_names=my_changes
     )
 
 
 def _mychanges(userid):
     """
-    Returns a list with all names of items which user userid has contributed to.
+    Returns a list with all fqnames of items which user userid has contributed to.
 
     :param userid: user itemid
     :type userid: unicode
@@ -876,8 +876,9 @@
     """
     q = And([Term(WIKINAME, app.cfg.interwikiname),
              Term(USERID, userid)])
-    revs = flaskg.storage.search(q, idx_name=ALL_REVS)
-    return set([rev.name for rev in revs])
+    revs = flaskg.storage.search(q, idx_name=ALL_REVS, limit=None)
+    fq_names = {fq_name for rev in revs for fq_name in rev.fqnames}
+    return fq_names
 
 
 @frontend.route('/+backrefs/<itemname:item_name>')