Fix for custom _phptemplate_variables()

  1. // Modified by Michelle (custom)
  2. function _phptemplate_variables($hook, $vars) {
  3.  if (module_exists('advanced_profile')) {
  4.    $vars = advanced_profile_addvars($hook, $vars);
  5.  }
  6.  
  7.  if ($hook == 'page') {
  8.     if (arg(0) == 'user') {
  9.       // Remove contact tab
  10.        if (is_numeric(arg(1)) && arg(2) == '') {
  11.           phptemplate_remove_tab('Contact', &$vars);
  12.         }    
  13.      
  14.     // Set all tabs on the user page to have the email address as the title
  15.      $uid = arg(1);
  16.      $account = user_load(array('uid' => $uid));
  17.      $vars['title'] = strip_tags($account->mail);
  18.    }
  19.  
  20.    if ($secondary = menu_secondary_local_tasks()) {
  21.      $output = '<span class="clear"></span>';
  22.      $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
  23.      $vars['tabs2'] = $output;
  24.    }
  25.  
  26.    // Hook into color.module
  27.    if (module_exists('color')) {
  28.      _color_page_alter($vars);
  29.    }
  30.    return $vars;
  31.  }
  32.  return $vars;
  33. }