Closed (fixed)
Project:
Fivestar
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2008 at 10:31 UTC
Updated:
19 Oct 2008 at 21:22 UTC
Hi,
CivicActions is reviewing and upgrading multiple modules for use on client sites. Part of this work is a coding standards review using the coder module. Attached you will find a patch for the problems found by the "upgrade to Drupal 6" review.
The three errors fixed by the patch are:
Line 486: When labelling buttons, make it clear what the button does, "Submit" is too generic.
'#value' => t('Submit'),
Line 493: The parameters for form validation and submission functions have changed to $form, &$form_state. (Drupal Docs)
function fivestar_settings_submit($form, $form_state) {
Line 935: Use menu_get_object() to get an object based on your path (Drupal Docs)
$node = node_load(arg(1));
The first one is fairly minor, while for the second one, it was really just a typo (the & was omitted). Documentation on the third one can be found at http://drupal.org/node/114774#menu_get_object
Cheers,
Stella
| Comment | File | Size | Author |
|---|---|---|---|
| fivestar_upgradeD6.patch | 1.29 KB | stella |
Comments
Comment #1
stella commentedComment #2
catchThese changes all look good and the patch applies cleanly. Marking RTBC.
Comment #3
catchComment #4
quicksketchI added the t('Submit') => t('Save configuration') and $form_state => &$form_state changes. I omitted including the convenience menu_get_object() function to keep consistency between Drupal 5 and 6 versions.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.