Download & Extend

Ascendants and Descendants tabs appear on every node type

Project:Family Tree
Version:6.x-1.0-beta1
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Ascendants and Descendants tabs appear on every node type they should only appear on family_individual nodes.

Comments

#1

Status:active» fixed

Fixed - access callback checks node type before loading the tabs.

<?php
          $items
['node/%/tree/asc'] = array(
         
'title' => 'Ascendants',
           
'page callback' => 'family_view_tree_asc',
           
'page arguments' => array(1),
           
'type' => MENU_LOCAL_TASK,
           
'access callback'   => 'family_individual_check_type',
           
'access arguments' => array(1),
      );
     
$items['node/%/tree/desc'] = array(
         
'title' => 'Descendants',
           
'page callback' => 'family_view_tree_desc',
           
'page arguments' => array(1),
         
'type' => MENU_LOCAL_TASK,
           
'access callback'   => 'family_individual_check_type',
           
'access arguments' => array(1),
      );
   return
$items;
}
// function family_menu()

function family_individual_check_type($nid){
  if(
is_numeric($nid)){
   
$node = node_load($nid);
    if(
$node->type == 'family_individual'){
      return
TRUE;
    }
  }
  return
FALSE;
}
?>
AttachmentSize
family.module.txt 10.48 KB

--project followup subject--

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

#2

Status:fixed» closed (fixed)

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

#3

Status:closed (fixed)» postponed (maintainer needs more info)

Has this been committed to CVS?

#4

No, use my latest upload of family module http://drupal.org/node/339265#comment-1128891 which also includes the brith misspelling fix and mysql_fetch_array fix as well as this fix

#5

Status:postponed (maintainer needs more info)» fixed

Committed http://drupal.org/node/339265#comment-1128891 to CVS.

#6

Status:fixed» closed (fixed)

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

nobody click here