diff options
Diffstat (limited to 'www-apps/trac-webadmin/files/trac-webadmin-0.1.2-page_order.patch')
-rw-r--r-- | www-apps/trac-webadmin/files/trac-webadmin-0.1.2-page_order.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/www-apps/trac-webadmin/files/trac-webadmin-0.1.2-page_order.patch b/www-apps/trac-webadmin/files/trac-webadmin-0.1.2-page_order.patch new file mode 100644 index 000000000000..79961c1b8bb4 --- /dev/null +++ b/www-apps/trac-webadmin/files/trac-webadmin-0.1.2-page_order.patch @@ -0,0 +1,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): |