extras-buildsys/server UserInterface.py,1.40,1.41
Daniel Williams (dcbw)
fedora-extras-commits at redhat.com
Thu Aug 4 21:12:44 UTC 2005
- Previous message (by thread): rpms/stripesnoop/devel stripesnoop-1.5-deflinux.patch, NONE, 1.1 stripesnoop-1.5-rpmoptflags.patch, NONE, 1.1 stripesnoop.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): extras-buildsys ChangeLog,1.88,1.89
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dcbw
Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30502/server
Modified Files:
UserInterface.py
Log Message:
2005-08-04 Dan Williams <dcbw at redhat.com>
* server/UserInterface.py
- Accept asc/desc ordering in addition to field order. You now
do e.x.: args['orderby'] = ['package asc', 'endtime desc']
* www/indiv.psp
- Stick in-progress jobs at the top of the list
* www/template/head.psp
- Keep user's email address through the success/failed pages
Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- UserInterface.py 4 Aug 2005 20:27:12 -0000 1.40
+++ UserInterface.py 4 Aug 2005 21:12:42 -0000 1.41
@@ -293,12 +293,22 @@
return (-1, "Error: Invalid result order.", [])
orderby_sql = ''
for order in orderby_list:
- if not validate_orderby(order):
- return (-1, "Error: Invalid result order.", [])
+ direction = ''
+ try:
+ field, direction = order.split()
+ direction = direction.upper()
+ if direction != 'ASC' and direction != "DESC":
+ return (-1, "Error: Invalid result order '%s'." % order, [])
+ except ValueError:
+ field = order
+ if not validate_orderby(field):
+ return (-1, "Error: Invalid result order field '%s'." % field, [])
if len(orderby_sql) > 0:
- orderby_sql = orderby_sql + ', %s' % order
+ orderby_sql = orderby_sql + ', %s' % field
else:
- orderby_sql = order
+ orderby_sql = field
+ if len(direction) > 0:
+ orderby_sql = orderby_sql + ' %s' % direction
sql = sql + " ORDER BY %s" % orderby_sql
# Deal with max # records
- Previous message (by thread): rpms/stripesnoop/devel stripesnoop-1.5-deflinux.patch, NONE, 1.1 stripesnoop-1.5-rpmoptflags.patch, NONE, 1.1 stripesnoop.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): extras-buildsys ChangeLog,1.88,1.89
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list