bug in mailman-2.1.7/Mailman/Cgi/listinfo.py and HTML generation
if not mlist.digestable or not mlist.nondigestable:
replacements['<mm-digest-radio-button>'] = ""
replacements['<mm-undigest-radio-button>'] = ""
replacements['<mm-digest-question-start>'] = '<!-- '
replacements['<mm-digest-question-end>'] = ' -->'
else:
replacements['<mm-digest-radio-button>'] =
mlist.FormatDigestButton()
replacements['<mm-undigest-radio-button>'] =
mlist.FormatUndigestButton()
replacements['<mm-digest-question-start>'] = ''
replacements['<mm-digest-question-end>'] = ''
replacements['<mm-plain-digests-button>'] = \
apart that I do not know where the if ends (is it determined by the
formatting?), there is, I think, a bug. Shouldn't it be:
if not mlist.digestable or mlist.nondigestable:
and the parsing of the HTML template does not work anyway, as I have
digestable = 0
but the digest option still appears in my users option page.
Giuliano
Sorry, I mixed up the options with list subscription page, the list
subscription page is fine, as it uses mm-digest-question-start/end to
comment out the digest section and they are parsed correctly by
listinfo (apart from a possible extra 'not'), but in the options page
the digest section is not enclosed and the options.py file does not
parse the mm-digest-question-start/end values anyway. I see that an
error message is returned in the page when the digest mode is
prohibited, but I guess most users will not notice it.
On 2 Mar 2006, at 17:05, g wrote:
if not mlist.digestable or not mlist.nondigestable:
[...]
g wrote:
if not mlist.digestable or not mlist.nondigestable: replacements['<mm-digest-radio-button>'] = "" replacements['<mm-undigest-radio-button>'] = "" replacements['<mm-digest-question-start>'] = '<!-- ' replacements['<mm-digest-question-end>'] = ' -->' else: replacements['<mm-digest-radio-button>'] = mlist.FormatDigestButton() replacements['<mm-undigest-radio-button>'] = \ mlist.FormatUndigestButton() replacements['<mm-digest-question-start>'] = '' replacements['<mm-digest-question-end>'] = '' replacements['<mm-plain-digests-button>'] = \
apart that I do not know where the if ends (is it determined by the
formatting?),
Yes. Block structure in Python is determined by indentation.
there is, I think, a bug. Shouldn't it be:
if not mlist.digestable or mlist.nondigestable:
No. The intent is to not offer the digest radio buttons if there is no choice, i.e. if you can't choose digest or you can't choose nondigest because the choice is unavailable.
and the parsing of the HTML template does not work anyway, as I have
digestable = 0
but the digest option still appears in my users option page.
The code you quote above has to do with presenting a digest yes/no option on the subscribe form on the listinfo page. It doesn't affect whether or not the digest option appears on the user's options page.
The default user options page has the digest selection, but processing won't allow selection of an unavailable digest option.
If you want to remove the question altogether from the user options page, you have to edit the options.html template. See http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.048.htp for information on making a list specific, domain specific or sitewide edited version of this template, or you can make a list specific version via the "Edit the public HTML pages and text files" link on the list's admin pages.
-- Mark Sapiro msapiro@value.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2 Mar 2006, at 18:08, Mark Sapiro wrote:
there is, I think, a bug. Shouldn't it be:
if not mlist.digestable or mlist.nondigestable:
No. The intent is to not offer the digest radio buttons if there is no choice, i.e. if you can't choose digest or you can't choose nondigest because the choice is unavailable.
ok, I misunderstood the meaning of nondigestable (I tought it was an
equivalent alternative to not digestable...)!
and the parsing of the HTML template does not work anyway, as I have
digestable = 0
but the digest option still appears in my users option page.
The code you quote above has to do with presenting a digest yes/no option on the subscribe form on the listinfo page. It doesn't affect whether or not the digest option appears on the user's options page.
The default user options page has the digest selection, but processing won't allow selection of an unavailable digest option.
yes, I found that out (but my post is waiting to be vetted). As I
wrote there I think many users will not notice the error message though.
If you want to remove the question altogether from the user options page, you have to edit the options.html template. See http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.048.htp
thanks, that is very clear an useful.
Giuliano
participants (3)
-
g
-
Giuliano Gavazzi
-
Mark Sapiro