equal
deleted
inserted
replaced
15 from itertools import count |
15 from itertools import count |
16 |
16 |
17 from rql.utils import rqlvar_maker |
17 from rql.utils import rqlvar_maker |
18 |
18 |
19 from logilab.common.decorators import cached |
19 from logilab.common.decorators import cached |
|
20 from logilab.common.deprecation import obsolete |
20 |
21 |
21 from cubicweb.dbapi import DBAPIRequest |
22 from cubicweb.dbapi import DBAPIRequest |
22 from cubicweb.common.mail import header |
23 from cubicweb.common.mail import header |
23 from cubicweb.common.uilib import remove_html_tags |
24 from cubicweb.common.uilib import remove_html_tags |
24 from cubicweb.utils import SizeConstrainedList, HTMLHead |
25 from cubicweb.utils import SizeConstrainedList, HTMLHead |
616 score = 1.0 |
617 score = 1.0 |
617 else: |
618 else: |
618 for score in scores.split(';'): |
619 for score in scores.split(';'): |
619 try: |
620 try: |
620 scorekey, scoreval = score.split('=') |
621 scorekey, scoreval = score.split('=') |
621 if scorekey = 'q': # XXX 'level' |
622 if scorekey == 'q': # XXX 'level' |
622 score = float(score[2:]) # remove 'q=' |
623 score = float(score[2:]) # remove 'q=' |
623 except ValueError: |
624 except ValueError: |
624 continue |
625 continue |
625 values.append(value, score) |
626 values.append(value, score) |
626 values.sort(reverse=True) |
627 values.sort(reverse=True) |