clean up leftovers from removing root category
This commit is contained in:
parent
651db07359
commit
e32f66ba48
|
@ -206,9 +206,6 @@ class ComicPressComicPost {
|
||||||
|
|
||||||
function get_parent_categories() {
|
function get_parent_categories() {
|
||||||
$parents = wp_get_post_categories($this->post->ID);
|
$parents = wp_get_post_categories($this->post->ID);
|
||||||
do {
|
|
||||||
$parents
|
|
||||||
} while ($parents_found);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,8 @@ class ComicPressNavigation {
|
||||||
}
|
}
|
||||||
|
|
||||||
// global first/last
|
// global first/last
|
||||||
if ($root_category = $this->_storyline->root_category) {
|
|
||||||
foreach (array('first', 'last') as $field) {
|
foreach (array('first', 'last') as $field) {
|
||||||
$nav[$field] = $this->_dbi->{"get_${field}_comic"}($root_category);
|
$nav[$field] = $this->_dbi->{"get_${field}_comic"}(null);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($category = $this->_storyline->get_valid_post_category($post->ID)) {
|
if ($category = $this->_storyline->get_valid_post_category($post->ID)) {
|
||||||
|
|
|
@ -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(0))->method('get_previous_comic')->with(null, $post);
|
||||||
$dbi->expects($this->at(1))->method('get_next_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(2))->method('get_first_comic')->with(null);
|
||||||
$dbi->expects($this->at(3))->method('get_last_comic')->with(1);
|
$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(4))->method('get_previous_comic')->with(2, $post);
|
||||||
$dbi->expects($this->at(5))->method('get_next_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);
|
$dbi->expects($this->at(6))->method('get_first_comic')->with(1);
|
||||||
|
|
Loading…
Reference in New Issue