Hi,

I have a site that is accessed by anon users and I want a disclaimer to appear on certain pages. I have found that when you use the direct entry fields for detailing what the disclaimer should say (disclaimer_content and disclaimer_footer), the disclaimer message shows "n/a" instead of the entered text for anonymous users. This was driving me mad over Christmas!!! :-)

Anyway, I've found the root cause...

In disclaimer.module line 147 we have

$output = check_markup(variable_get('disclaimer_content', ''), variable_get('disclaimer_content_format', 1), 1);

but the final parameter (1) tells check_markup to determine if the user has permission to use this input format, which they don't have. The API says that this parameter should be FALSE if we don't want to check if the current user has permissions to apply this input format, which is what we want.

So, line 147 should read

$output = check_markup(variable_get('disclaimer_content', ''), variable_get('disclaimer_content_format', 1), FALSE);

The same would apply to writing out the footer message at line 155.

Sorry, I'm particularly hopeless at creating CVS patches and would appreciate help with that but the change makes sense.

Rachel

Comments

mogtofu33’s picture

Assigned: Unassigned » mogtofu33
Status: Active » Fixed

Hi,

Was fixed on dev, ported on 6.x-1.8.
Thanks.

regards.
Mog.

rachel_norfolk’s picture

ah - looks like we had both spotted the error!!

Thanks anyway.

Rachel

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.