| 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 |
|
|
| 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 |
/** |
/** |
| 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 |
/** |
/** |
| 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 |
/** |
/** |
| 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 |
* |
* |