blob: 79961c1b8bb474c30873825238c9ac9cc1442ddc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff -NurpP trac-webadmin-0.1.2/webadmin/web_ui.py webadmin/webadmin/web_ui.py
--- trac-webadmin-0.1.2/webadmin/web_ui.py 2006-11-13 23:48:07.000000000 +0100
+++ webadmin/webadmin/web_ui.py 2008-03-04 11:08:15.533564477 +0100
@@ -87,7 +87,17 @@ class AdminModule(Component):
for page in p:
providers[(page[0], page[2])] = provider
pages += p
- pages.sort()
+ def _page_order(p1, p2):
+ if p1[0] == 'general':
+ if p2[0] == 'general':
+ return cmp(p1[1:], p2[1:])
+ return -1
+ elif p2[0] == 'general':
+ if p1[0] == 'general':
+ return cmp(p1[1:], p2[1:])
+ return 1
+ return cmp(p1, p2)
+ pages.sort(_page_order)
return pages, providers
def process_request(self, req):
|