Small bug

nquocbao - March 11, 2009 - 13:45
Project:Taxonomy Blocks
Version:6.x-1.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I found two small bugs on 1.0-beta as follow:

this code
$show_empty = variable_get('taxonomy_blocks_vid_'. $delta .'_show_empty', 0);

should be
$show_empty = variable_get('taxonomy_blocks_vid_'. $delta .'_show_empty', 1);

because we set default to show empty node

    $form['block']['show_empty'] = array(
      '#type' => 'checkbox',
      '#title' => t('Show Empty Terms'),
      '#description' => t('If checked, terms with no members will be shown.'),
      '#default_value' => variable_get('taxonomy_blocks_vid_'. $delta .'_show_empty', 1),
      '#weight' => -8,
    );

And

    // Have to set these in order to show our form items at the bottom
    $form['submit']['#weight'] = 10;
    $form['delete']['#weight'] = 10;

should be

    // Have to set these in order to show our form items at the bottom
    $form['submit']['#weight'] = 10;
    $form['delete']['#weight'] = 11;

or delete button will appear before submit button :-D

 
 

Drupal is a registered trademark of Dries Buytaert.