Modify

Opened 12 years ago

Closed 11 years ago

#10186 closed defect (fixed)

Logic on the settings page is backwards...

Reported by: branson Owned by: branson
Priority: normal Component: TracAjaxCommentsPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos Trac Release: 0.12

Description

Is:

 if req.args.get('enabled'):
                    req.session[self.session_field] = 'False'

should be :

 if not req.args.get('enabled'):
                    req.session[self.session_field] = 'False'

Attachments (0)

Change History (5)

comment:1 Changed 12 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

Is this plugin still maintained?

comment:2 Changed 12 years ago by anonymous

yer about to do it to me again aren't you .. ;-) .. I'll submit ticket and mail...

comment:3 Changed 12 years ago by Ryan J Ollos

Well, if you keeping fixing bugs at the rate you have been, then you're asking for it ;)

comment:4 Changed 12 years ago by kostialopuhin

Owner: changed from kostialopuhin to branson

Hmm looks really strange. If you change it, you also should change the previous line, so the whole change would be:

from

51     req.session[self.session_field] = 'True'
52     if req.args.get('enabled'):
53         req.session[self.session_field] = 'False'

to

51     req.session[self.session_field] = str(bool(req.args.get('enabled', False))

but you should test)

I think I just copied that code from some example, and maybe made some mistakes along the way, don't remember writing it ;)

As for another part - I will answer in #10187

comment:5 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Appears to be fixed in [11838].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain branson.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.