/[drupal]/contributions/modules/og_content_type_admin/og_content_type_admin.module
ViewVC logotype

Diff of /contributions/modules/og_content_type_admin/og_content_type_admin.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15.2.5, Thu Nov 6 22:52:12 2008 UTC revision 1.15.2.6, Fri Nov 28 00:35:08 2008 UTC
# Line 78  function og_content_type_admin_perm() { Line 78  function og_content_type_admin_perm() {
78  } // function og_content_type_admin_perm()  } // function og_content_type_admin_perm()
79    
80    
81  /**  function og_content_type_admin_flush_all_caches() {
  * Implementation of hook_init  
  *  
  */  
 function og_content_type_admin_init() {  
82    drupal_flush_all_caches();    drupal_flush_all_caches();
83  }  }
84    
# Line 250  function og_content_type_admin_main_subm Line 246  function og_content_type_admin_main_subm
246      drupal_set_message(t('The group has been added.'));      drupal_set_message(t('The group has been added.'));
247    }    }
248    $form_state['redirect'] = 'admin/og/og_content_types';    $form_state['redirect'] = 'admin/og/og_content_types';
249      og_content_type_admin_flush_all_caches();
250  } //function og_content_type_admin_main_submit()  } //function og_content_type_admin_main_submit()
251    
252  /**  /**
# Line 324  function og_content_type_admin_confirm_d Line 321  function og_content_type_admin_confirm_d
321      watchdog('content', t('og_content_type_admin: deleted %gid.', array('%gid' => $form_values['name'])));      watchdog('content', t('og_content_type_admin: deleted %gid.', array('%gid' => $form_values['name'])));
322    }    }
323    $form_state['redirect'] = 'admin/og/og_content_types';    $form_state['redirect'] = 'admin/og/og_content_types';
324      og_content_type_admin_flush_all_caches();
325  } // function og_content_type_admin_confirm_delete_submit()  } // function og_content_type_admin_confirm_delete_submit()
326    
327  /**  /**
# Line 536  function og_content_type_admin_admin_sub Line 534  function og_content_type_admin_admin_sub
534    else {    else {
535      drupal_set_message(t('The changes have been saved. The group owner must now activate content types for them to be used in that group.'));      drupal_set_message(t('The changes have been saved. The group owner must now activate content types for them to be used in that group.'));
536    }    }
537      og_content_type_admin_flush_all_caches();
538  } //function og_content_type_admin_admin_submit()  } //function og_content_type_admin_admin_submit()
539    
540  /**  /**
# Line 794  function og_content_type_admin_menu_alte Line 793  function og_content_type_admin_menu_alte
793    $activated_types = unserialize($types->types_active);    $activated_types = unserialize($types->types_active);
794    foreach ($activated_types as $type => $value) {    foreach ($activated_types as $type => $value) {
795          $node_type = isset($type) ? str_replace('_', '-', $type) : NULL;          $node_type = isset($type) ? str_replace('_', '-', $type) : NULL;
796      $type_path = "node/add/$node_type";  //print_r($types);      $type_path = "node/add/$node_type";
797      if ($activated_types[$type] && node_access('create', $type)) {      if ($activated_types[$type] && node_access('create', $type)) {
798         $callbacks[$type_path]['access callback'] = TRUE;         $callbacks[$type_path]['access callback'] = TRUE;
799      }      }
800    }    }
801  }  }
802  // 1. why is this function called twice  
 // 2. why is og_content_type_admin_node_add() not being called  
803   /**   /**
804   * Interception of the node module's node_add function.   * Interception of the node module's node_add function.
805   *   *

Legend:
Removed from v.1.15.2.5  
changed lines
  Added in v.1.15.2.6

  ViewVC Help
Powered by ViewVC 1.1.2