The attached patch changes this line in blueprint_preprocess_comment from:
if (theme_get_setting('toggle_comment_user_picture') && empty($vars['comment']->picture)) {
to this:
if (theme_get_setting('toggle_comment_user_picture') && empty($vars['picture'])) {
as the former always evaluates to true, because the picture is in the $vars array, not part of the comment itself.
| Comment | File | Size | Author |
|---|---|---|---|
| blueprint.comment.patch | 650 bytes | jhedstrom |
Comments
Comment #1
designerbrent commentedI'm a little confused by this patch. The actual code
is checking to see if there is something INSIDE of the variable "$vars['comment']->picture" which does not always return true.
At this point, I'm marking this as "won't fix" as it doesn't appear to be a problem. However if you can show me where the problem lies, I'll be happy to address it.
Comment #2
jhedstromHey designerbrent,
The issue is that, in my tests, $vars['comment']->picture is never actually set, so
$vars['comment']->picturealways evaluates to false. Instead, the code should check for $vars['picture'] being empty.http://api.drupal.org/api/function/template_preprocess_comment/6
Comment #3
designerbrent commentedHey jhedstrom. Thanks for the quick reply.
In my test site (Drupal 6.14) $vars['comment']->picture is set if the user has a picture. If they don't the variable is empty. On the other hand, $vars['picture'] is always set to
prior to this. So it would make it harder to test.