--- wordpress_import.module.orig 2009-02-08 17:10:28.000000000 -0500 +++ wordpress_import.module 2009-08-04 15:28:04.000000000 -0400 @@ -219,6 +219,25 @@ '#title' => 'Create path aliases', '#description' => t('This option tries to preserve the path of the wordpress original posts. It is useful only if the url of your drupal site root is the same as the wordpress site (!root) and if clean urls are activated', array('!root' => $wordpress['link'])) ); + + // Organic groups + + if (module_exists('og')) { + $form['og_nodeapi'] = array( + '#type' => 'fieldset', + '#title' => t('Organic groups'), + '#collapsible' => TRUE + ); + og_form_add_og_audience($form, $form_state); + if (module_exists('og_access')) { + $form['og_nodeapi']['og_public'] = array( + '#type' => 'checkbox', + '#title' => 'Public', + '#description' => t('Show this post to everyone, or only to members of the groups checked above. Posts without any groups are always public.'), + ); + } + } + break; // Step 3: @@ -342,7 +361,12 @@ $_SESSION['wordpress_import']['users_map'] = wordpress_import_apply_default_user_mapping($form_state['values']['users_map'], $form_state['values']['default_user_mapping']); $_SESSION['wordpress_import']['alias'] = $form_state['values']['alias']; $_SESSION['wordpress_import']['blog_type'] = $form_state['values']['blog_type']; - + + if (module_exists('og')) { + $_SESSION['wordpress_import']['og_groups'] = $form_state['values']['og_groups']; + $_SESSION['wordpress_import']['og_public'] = $form_state['values']['og_public']; + } + if (!wordpress_import_must_create_users($form_state['values']['users_map'])) { wordpress_import_import_blog($_SESSION['wordpress_import']); } @@ -619,6 +643,13 @@ ); $node = (object)$node; + + if (module_exists('og')) { + $node->og_groups = $params['og_groups']; + $node->og_public = (int) $params['og_public']; + og_save_ancestry($node); + } + node_save($node); $_SESSION['wordpress_import']['report']['@created_posts'] ++; $return['nid'] = $node->nid;