Index: og_vocab.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_vocab/Attic/og_vocab.module,v
retrieving revision 1.18.2.1
diff -r1.18.2.1 og_vocab.module
2c2
< // $Id: og_vocab.module,v 1.18.2.1 2008/06/17 15:33:04 weitzman Exp $
---
> // $Id: og_vocab.module,v 1.18 2008/06/10 18:56:35 weitzman Exp $
50d49
<   global $user;
58c57
<     'access arguments' => array('update', 1, $user),
---
>     'access arguments' => array('update', 1),
69c68
<     'access arguments' => array('update', 1, $user),
---
>     'access arguments' => array('update', 1),
81c80
<     'access arguments' => array('update', 1, $user),
---
>     'access arguments' => array('update', 1),
93c92
<     'access arguments' => array('update', 1, $user),
---
>     'access arguments' => array('update', 1),
113c112
<     'access arguments' => array('update', 1, $user),
---
>     'access arguments' => array('update', 1),
124,132c123,129
<   if (function_exists('drupal_set_content')) {
<     // set group context if we own this term
<     if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
<       $sql = "SELECT ogv.nid FROM {term_data} td INNER JOIN {og_vocab} ogv ON td.vid = ogv.vid WHERE td.tid = %d";
<       // arg(2) is known numeric. see 2 lines above
<       if ($gid = db_result(db_query($sql, arg(2)))) {
<         og_set_group_context(node_load($gid));
<         // again, breadcrumb is not correct here but menu system hasn't built yet.
<       }
---
>   // set group context if we own this term
>   if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
>     $sql = "SELECT ogv.nid FROM {term_data} td INNER JOIN {og_vocab} ogv ON td.vid = ogv.vid WHERE td.tid = %d";
>     // arg(2) is known numeric. see 2 lines above
>     if ($gid = db_result(db_query($sql, arg(2)))) {
>       og_set_group_context(node_load($gid));
>       // again, breadcrumb is not correct here but menu system hasn't built yet.
198a196,219
>  * D6 way to alter the form using form id in the function call
>  */
> function og_vocab_form_taxonomy_form_vocabulary_alter(&$form, &$form_state) {
>   if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'og') {
>     $form['module'] = array('#type' => 'value', '#value' => 'og_vocab');
>     $form['og'] = array('#type' => 'value', '#value' => arg(1));
>     $omit = og_get_types('omit');
>     foreach ($omit as $type) {
>       unset($form['nodes']['#options'][$type]);
>     }
>   }
> }
> 
> /**
>  * D6 way to alter the form using form id in the function call
>  */
> function og_vocab_form_taxonomy_form_term_alter(&$form, &$form_state) {
>   $vocab = og_get_types('omit');
>   if ($vocab->module == 'og_vocab') {
>     unset($form['synonyms']);
>   }
> }
> 
> /**
203,218d223
<     case 'taxonomy_form_vocabulary':
<       if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'og') {
<         $form['module'] = array('#type' => 'value', '#value' => 'og_vocab');
<         $form['og'] = array('#type' => 'value', '#value' => arg(1));
<         $omit = array_merge(variable_get('og_node_types', array('og')), variable_get('og_omitted', array()));
<         foreach ($omit as $type) {
<           unset($form['nodes']['#options'][$type]);
<         }
<       }
<       break;
<     case 'taxonomy_form_term':
<       $vocab = taxonomy_vocabulary_load($form['vid']['#value']);
<       if ($vocab->module == 'og_vocab') {
<         unset($form['synonyms']);
<       }
<       break;
288c293
<   $links[] = l(t('add vocabulary'), "node/$gid/og/vocab/add/vocabulary", array(), drupal_get_destination());
---
>   $links[] = l(t('add vocabulary'), "node/$gid/og/vocab/add/vocabulary", array('query' => drupal_get_destination()));
300c305
<       l(t('edit vocabulary'), "node/$gid/og/vocab/edit/vocabulary/$vocabulary->vid", array(), drupal_get_destination()),
---
>       l(t('edit vocabulary'), "node/$gid/og/vocab/edit/vocabulary/$vocabulary->vid", array('query' => drupal_get_destination())),
345c350,351
< function og_vocab_determine_access($action, $node, $user) {
---
> function og_vocab_determine_access($action, $node) {
>   global $user;
351d356
<   drupal_set_message('Returning False');
355,360d359
< // function needed to call the vocabulary portion of the og_vocab
< function og_vocab_add_vocabulary() {
<   require_once drupal_get_path('module', 'taxonomy') . '/taxonomy.admin.inc';
<   return @taxonomy_form_vocabulary($form_state);
< }
< 
