[wp-trac] [WordPress Trac] #7529: Bug in textpattern import
WordPress Trac
wp-trac at lists.automattic.com
Sat Aug 16 11:08:32 GMT 2008
#7529: Bug in textpattern import
----------------------------+-----------------------------------------------
Reporter: jhernandis | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.6.1
Component: Administration | Version: 2.6.1
Severity: normal | Keywords: textpattern import
----------------------------+-----------------------------------------------
In "textpattern.php" in wp-admin/import, at the line 332, shows like this:
{{{
$cats = array();
$category1 =
get_category_by_slug($Category1);
$category1 = $category1->term_id;
$category2 =
get_category_by_slug($Category2);
$category2 = $category1->term_id;
if($cat1 = $category1) { $cats[1] = $cat1;
}
if($cat2 = $category2) { $cats[2] = $cat2;
}
}}}
There is a bug that makes the categories was not assigned correctly. The
right code is that:
{{{
$cats = array();
$category1 =
get_category_by_slug($Category1);
$category1 = $category1->term_id;
$category2 =
get_category_by_slug($Category2);
$category2 = $category2->term_id;
if($cat1 = $category1) { $cats[0] = $cat1;
}
if($cat2 = $category2) { $cats[1] = $cat2;
}
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/7529>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list