/[drupal]/contributions/modules/spaces/spaces_og/spaces_og.module
ViewVC logotype

Diff of /contributions/modules/spaces/spaces_og/spaces_og.module

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

revision 1.1.2.29.2.20, Thu Jul 30 20:13:08 2009 UTC revision 1.1.2.29.2.21, Tue Aug 25 02:15:06 2009 UTC
# Line 55  if (function_exists('spaces_menu')) { Line 55  if (function_exists('spaces_menu')) {
55                continue;                continue;
56              }              }
57    
58              db_query("UPDATE {og_ancestry} og INNER JOIN {node} n ON og.nid = n.nid              // Check the schema to see if we're using OG 1.x or 2.x
59                        SET is_public = %d WHERE og.group_nid = %d              $schema = drupal_get_schema('og_ancestry');
60                        AND n.type = '%s'", $is_public, $this->group->nid, $type);              if(isset($schema['fields']['is_public'])) {
61                  // OG 1.x
62                  db_query("UPDATE {og_ancestry} og INNER JOIN {node} n ON og.nid = n.nid
63                            SET is_public = %d WHERE og.group_nid = %d
64                            AND n.type = '%s'", $is_public, $this->group->nid, $type);
65                }
66                else {
67                  // OG 2.x
68                  db_query("UPDATE {og_access_post} og_p
69                            INNER JOIN {og_ancestry} og_a ON og_p.nid = og_a.nid
70                            INNER JOIN {node} n ON og_p.nid = n.nid
71                            SET og_public = %d WHERE og_a.group_nid = %d
72                            AND n.type = '%s'", $is_public, $this->group->nid, $type);
73                }
74            }            }
75          }          }
76        }        }

Legend:
Removed from v.1.1.2.29.2.20  
changed lines
  Added in v.1.1.2.29.2.21

  ViewVC Help
Powered by ViewVC 1.1.2