Closed (works as designed)
Project:
Fivestar
Version:
5.x-1.11-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2008 at 06:51 UTC
Updated:
6 Mar 2008 at 19:15 UTC
'title' $setting in fivestar_form() uses broken shorthand PHP syntax
$settings = array(
'stars' => variable_get('fivestar_stars_'. $node->type, 5),
'content_type' => $content_type,
'content_id' => $content_id,
'autosubmit' => TRUE,
- 'title' => variable_get('fivestar_title_'. $node->type, 1) ? NULL : FALSE,
+ 'title' => variable_get('fivestar_title_'. $node->type, FALSE),
'labels_enable' => variable_get('fivestar_labels_enable_'. $node->type, 1),
'labels' => variable_get('fivestar_labels_'. $node->type, array()),
);
The original line would never equate to anything better than NULL or FALSE variable_get('fivestar_title_'. $node->type, 1) ? NULL : FALSE it should just be
variable_get('fivestar_title_'. $node->type, FALSE);
| Comment | File | Size | Author |
|---|---|---|---|
| fivestar-title-settings.patch | 653 bytes | dgtlmoon |
Comments
Comment #1
dgtlmoon commentedComment #2
quicksketchThis is intentional. fivestar_custom_form() takes the $title['setting'] and processes it as noted in the comments:
This is setting up for possibly over-ridding the title in the Fivestar UI but has not yet been implemented.