clean up leftovers from removing root category

This commit is contained in:
John Bintz 2009-11-06 07:51:32 -05:00
parent 651db07359
commit e32f66ba48
3 changed files with 4 additions and 9 deletions

View File

@ -206,9 +206,6 @@ class ComicPressComicPost {
function get_parent_categories() {
$parents = wp_get_post_categories($this->post->ID);
do {
$parents
} while ($parents_found);
}
}

View File

@ -18,10 +18,8 @@ class ComicPressNavigation {
}
// global first/last
if ($root_category = $this->_storyline->root_category) {
foreach (array('first', 'last') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($root_category);
}
foreach (array('first', 'last') as $field) {
$nav[$field] = $this->_dbi->{"get_${field}_comic"}(null);
}
if ($category = $this->_storyline->get_valid_post_category($post->ID)) {

View File

@ -30,8 +30,8 @@ class ComicPressNavigationTest extends PHPUnit_Framework_TestCase {
$dbi->expects($this->at(0))->method('get_previous_comic')->with(null, $post);
$dbi->expects($this->at(1))->method('get_next_comic')->with(null, $post);
$dbi->expects($this->at(2))->method('get_first_comic')->with(1);
$dbi->expects($this->at(3))->method('get_last_comic')->with(1);
$dbi->expects($this->at(2))->method('get_first_comic')->with(null);
$dbi->expects($this->at(3))->method('get_last_comic')->with(null);
$dbi->expects($this->at(4))->method('get_previous_comic')->with(2, $post);
$dbi->expects($this->at(5))->method('get_next_comic')->with(2, $post);
$dbi->expects($this->at(6))->method('get_first_comic')->with(1);