Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#4941 closed defect (fixed)

[4982] breaks title attributes

Reported by: johann@… Owned by: Matthew Good
Priority: normal Milestone: not applicable
Component: plugin/spamfilter Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The bogus patch that I initially submitted as a workaround for #4611 has been applied in [4982] and breaks the title attributes (tooltips). It should be reverted.

I mean only the two diffs in admin_spammonitor.html here: http://trac.edgewall.org/changeset/4982#file1

The other changes in [4982] are okay (and incomplete, but I will file another ticket for that).

Before my bogus patch was applied, the construct "x and y or z" was used a backwards-compatible expression for "y if x else z" (which is only available in Python 2.5 and above).

Old behaviour (before [4982]) is correct.

>>> author = 'Author with more than 25 characters'
>>> len(author) > 25 and author or None
'Author with more than 25 characters'

New behaviour (after [4982]) is incorrect, it displays 'True' instead of the author:

>>> author = 'Author with more than 25 characters'
>>> author and len(author) > 25 or None
True

Sorry for the confusion with my bogus patch. I should have removed it when I realized that it didn't fix the problem.

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 17 years ago

Milestone: none
Severity: normalminor

comment:2 by osimons, 16 years ago

Resolution: fixed
Status: newclosed

Fixed as [6418].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.