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

CommentFileSizeAuthor
fivestar_upgradeD6.patch1.29 KBstella

Comments

stella’s picture

Title: Patches for Coder Review fixes » Patch for "Upgrade to D6" Coder review
catch’s picture

These changes all look good and the patch applies cleanly. Marking RTBC.

catch’s picture

Status: Needs review » Reviewed & tested by the community
quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

I 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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