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

Diff of /contributions/modules/og_blueprints/og_blueprints.module

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

revision 1.1.2.17, Mon Sep 15 18:40:16 2008 UTC revision 1.1.2.18, Mon Sep 15 18:41:36 2008 UTC
# Line 1366  function og_blueprints_sync_bundles_with Line 1366  function og_blueprints_sync_bundles_with
1366   */   */
1367  function og_blueprints_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { // TODO add hook here to check for updates  function og_blueprints_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { // TODO add hook here to check for updates
1368    if ($op == 'insert' && $bundle_mode = og_blueprints_mode()) {    if ($op == 'insert' && $bundle_mode = og_blueprints_mode()) {
1369      if (in_array($group_type = $node->type, array_keys(og_blueprints_group_types()))) {      // Ensures that a release has been created, and that that release has some
1370        // displays in it before trying to instantiate. TODO move to instantiator
1371        if (db_result(db_query("SELECT release_id FROM {og_bundle} AS b INNER JOIN {og_blueprint} AS bp ON b.vid = bp.vid WHERE b.grouptype = '%s'", $node->type))) {
1372        $bundle = new og_bundle_instantiator($node->nid, $group_type);        $bundle = new og_bundle_instantiator($node->nid, $group_type);
1373        $bundle->instantiate();        $bundle->instantiate();
1374      }      }

Legend:
Removed from v.1.1.2.17  
changed lines
  Added in v.1.1.2.18

  ViewVC Help
Powered by ViewVC 1.1.2