Plugin Directory

Changeset 204733


Ignore:
Timestamp:
02/12/2010 11:50:13 PM (16 years ago)
Author:
johncoswell
Message:

Bugfix for immediate build generation and sub-category addition when adding posts

Location:
post-fixtures
Files:
4 edited
7 copied

Legend:

Unmodified
Added
Removed
  • post-fixtures/tags/0.2.2/classes/FixtureBuilder.inc

    r194981 r204733  
    8585        if (!empty($this->current_object)) {
    8686            $this->ensure_type($this->current_object['type']);
    87             return $this->{"build_{$this->current_object['type']}"}($this->current_object);
     87            $result = $this->{"build_{$this->current_object['type']}"}($this->current_object);
     88            unset($this->current_object);
     89            return $result;
    8890        }
    8991    }
     
    130132            if (isset($obj['post']['categories'])) {
    131133                $category_ids_by_slug = array();
     134                $category_ids = array();
    132135                foreach ($obj['post']['categories'] as $category) {
    133                     $category_ids_by_slug = array_merge($category_ids_by_slug, PostFixtures::create_category($category));
     136                    $created_categories = PostFixtures::create_category($category);
     137                    $category_ids[] = array_pop(array_values($created_categories));
     138                    $category_ids_by_slug = array_merge($category_ids_by_slug, $created_categories);
    134139                }
    135                 $category_ids = array_values($category_ids_by_slug);
    136140                PostFixtures::set_post_categories($post_id, $category_ids);
    137141            }
  • post-fixtures/tags/0.2.2/post-fixtures.php

    r197142 r204733  
    44Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
    55Description: Tear down and build up well crafted posts, categories, meta data, and other WordPress data in a test environment.
    6 Version: 0.2.1
     6Version: 0.2.2
    77Author: John Bintz
    88Author URI: http://www.coswellproductions.com/wordpress/
  • post-fixtures/tags/0.2.2/readme.txt

    r197142 r204733  
    55Requires at least: 2.8
    66Tested up to: 2.9.1
    7 Stable tag: 0.2.1
     7Stable tag: 0.2.2
    88
    99Post Fixtures let you quickly tear down and set up test environments within your development WordPress environment.
     
    105105== Changelog ==
    106106
     107= 0.2.2 =
     108
     109* Bugfix for immediate build generation and sub-category addition when adding posts.
     110
    107111= 0.2.1 =
    108112
     
    115119== Upgrade Notice ==
    116120
     121= 0.2.2 =
     122
     123* Bugfix for immediate build generation and sub-category addition when adding posts.
     124
    117125= 0.2.1 =
    118126
  • post-fixtures/trunk/classes/FixtureBuilder.inc

    r194981 r204733  
    8585        if (!empty($this->current_object)) {
    8686            $this->ensure_type($this->current_object['type']);
    87             return $this->{"build_{$this->current_object['type']}"}($this->current_object);
     87            $result = $this->{"build_{$this->current_object['type']}"}($this->current_object);
     88            unset($this->current_object);
     89            return $result;
    8890        }
    8991    }
     
    130132            if (isset($obj['post']['categories'])) {
    131133                $category_ids_by_slug = array();
     134                $category_ids = array();
    132135                foreach ($obj['post']['categories'] as $category) {
    133                     $category_ids_by_slug = array_merge($category_ids_by_slug, PostFixtures::create_category($category));
     136                    $created_categories = PostFixtures::create_category($category);
     137                    $category_ids[] = array_pop(array_values($created_categories));
     138                    $category_ids_by_slug = array_merge($category_ids_by_slug, $created_categories);
    134139                }
    135                 $category_ids = array_values($category_ids_by_slug);
    136140                PostFixtures::set_post_categories($post_id, $category_ids);
    137141            }
  • post-fixtures/trunk/post-fixtures.php

    r197142 r204733  
    44Plugin URI: http://www.coswellproductions.com/wordpress/wordpress-plugins/
    55Description: Tear down and build up well crafted posts, categories, meta data, and other WordPress data in a test environment.
    6 Version: 0.2.1
     6Version: 0.2.2
    77Author: John Bintz
    88Author URI: http://www.coswellproductions.com/wordpress/
  • post-fixtures/trunk/readme.txt

    r197142 r204733  
    55Requires at least: 2.8
    66Tested up to: 2.9.1
    7 Stable tag: 0.2.1
     7Stable tag: 0.2.2
    88
    99Post Fixtures let you quickly tear down and set up test environments within your development WordPress environment.
     
    105105== Changelog ==
    106106
     107= 0.2.2 =
     108
     109* Bugfix for immediate build generation and sub-category addition when adding posts.
     110
    107111= 0.2.1 =
    108112
     
    115119== Upgrade Notice ==
    116120
     121= 0.2.2 =
     122
     123* Bugfix for immediate build generation and sub-category addition when adding posts.
     124
    117125= 0.2.1 =
    118126
Note: See TracChangeset for help on using the changeset viewer.