Commit bc4f36d4 authored by Mike Ryan's avatar Mike Ryan
Browse files

Issue #2133197 by mikeryan: Make Previous buttons in wizard work properly

parent 3850d827
Loading
Loading
Loading
Loading
+1 −1
Changes for wordpress_migrate.info: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ description = "Imports WordPress sites into Drupal"
package = "Migration"
core = 7.x
dependencies[] = migrate
dependencies[] = migrate_ui (>7.x-2.5)
dependencies[] = migrate_ui (>7.x-2.6-rc1+76-dev)

files[] = wordpress_migrate.migrate.inc
files[] = wordpress_source.inc
+11 −1
Changes for wordpress_migrate.migrate.inc: 11 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -394,6 +394,12 @@ class WordPressMigrateWizard extends MigrateUIWizard {
  }

  protected function contentSelectFormValidate(&$form_state) {
    // Start clean in case we came here via Previous.
    unset($this->contentValues['blog']);
    unset($this->contentValues['page']);
    $this->removeStep(t('Blog posts'));
    $this->removeStep(t('Pages'));

    $this->contentValues['page']['page_type'] = $form_state['values']['page_type'];
    if ($this->contentValues['page']['page_type']) {
      $this->addStep(t('Pages'), 'contentPageForm', $this->currentStep);
@@ -635,6 +641,10 @@ class WordPressMigrateWizard extends MigrateUIWizard {
   * to say yay or nay.
   */
  protected function reviewForm(&$form_state) {
    // In case we've been going back-and-forth with Previous, make sure we
    // start with no migrations - all migrations will be added here.
    $this->migrations = array();

    $blog = wordpress_migrate_blog($this->filename);
    $migration_classes = $blog->migrationClasses();

@@ -750,7 +760,7 @@ class WordPressMigrateWizard extends MigrateUIWizard {
          'source_post_type' => 'page',
          'dependencies' => array('Page'),
          'text_format_comment' => $this->contentValues['page']['text_format_comment'],
          'skip_pingbacks' => $this->contentValues['blog']['pingbacks'],
          'skip_pingbacks' => $this->contentValues['page']['pingbacks'],
        );
        $this->addMigration('PageComment', $migration_classes['WordPressComment'], $arguments);
      }