changeset 2707:a6c76ccde011

Fixes issue #454 Fixed the Global Index to show the alphabetical filters to sort the items
author Ajitesh Gupta <ajgupta93@gmail.com>
date Thu, 14 Aug 2014 21:06:34 +0530
parents c7fe669a6c5c
children b8680cd6cf91
files MoinMoin/items/__init__.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Thu Aug 14 20:58:27 2014 +0530
+++ b/MoinMoin/items/__init__.py	Thu Aug 14 21:06:34 2014 +0530
@@ -749,13 +749,12 @@
             for name in item.meta[NAME]:
                 prefix = self.get_prefix_match(name, prefixes)
                 prefixlen = len(prefix)
-                if prefix:
-                    initial = name[prefixlen]
-                    if uppercase:
-                        initial = initial.upper()
-                    elif lowercase:
-                        initial = initial.lower()
-                    initials.add(initial)
+                initial = name[prefixlen]
+                if uppercase:
+                    initial = initial.upper()
+                elif lowercase:
+                    initial = initial.lower()
+                initials.add(initial)
         return sorted(list(initials))
 
     delete_template = 'delete.html'