| 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 |
} |
} |