changeset 789:c3a133ae4c24 pytest2

user: do not use MoinMoin.storage.terms, which is deprecated
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 28 Aug 2011 16:24:11 +0200
parents 9fe3154e6ad0
children 8ac1f87be5c2
files MoinMoin/user.py
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Sun Aug 28 16:14:56 2011 +0200
+++ b/MoinMoin/user.py	Sun Aug 28 16:24:11 2011 +0200
@@ -106,16 +106,13 @@
 
 
 def get_items_by_filter(key, value):
-    """ Searches for an user with a given filter """
-    from MoinMoin.storage.terms import ItemMetaDataMatch
+    """ Searches for a user with a given filter """
     backend = get_user_backend()
-    searchterm = ItemMetaDataMatch(key, value)
-    items = []
+    items_found = []
     for item in backend.iteritems():
-        searchterm.prepare()
-        if searchterm.evaluate(item):
-            items.append(item)
-    return items
+        if item.get(key) == value:
+            items_found.append(item)
+    return items_found
 
 
 def get_by_email_address(email_address):