MoinShare

Changeset

57:5c334ed426e7
2014-01-26 Paul Boddie raw files shortlog changelog graph Fixed enumeration of items since missing items will cause a straight count of items to be inconsistent with the numbering of the remaining items.
MoinShare.py (file)
     1.1 --- a/MoinShare.py	Thu Jan 09 22:54:51 2014 +0100
     1.2 +++ b/MoinShare.py	Sun Jan 26 00:42:49 2014 +0100
     1.3 @@ -219,8 +219,12 @@
     1.4  
     1.5      store = ItemStore(page, "messages", "message-locks")
     1.6  
     1.7 -    for n, message_text in enumerate(iter(store)):
     1.8 -        update = getUpdateFromMessageText(message_text, n, request)
     1.9 +    keys = store.keys()
    1.10 +    keys.sort()
    1.11 +
    1.12 +    for key in keys:
    1.13 +        message_text = store[key]
    1.14 +        update = getUpdateFromMessageText(message_text, key, request)
    1.15          update.page = page
    1.16          updates.append(update)
    1.17