diff --git a/classes/ComicPressStoryline.inc b/classes/ComicPressStoryline.inc
index d59255d..2762fc4 100644
--- a/classes/ComicPressStoryline.inc
+++ b/classes/ComicPressStoryline.inc
@@ -428,14 +428,6 @@ class ComicPressStoryline {
return $this;
}
- function &include_children($parent = null) {
- return $this->_include('_find_children', $parent);
- }
-
- function &exclude_children($parent = null) {
- return $this->_exclude('_find_children', $parent);
- }
-
function _find_level_or_above($level = null) {
$found = array();
foreach ($this->_structure as $category_id => $info) {
@@ -444,14 +436,6 @@ class ComicPressStoryline {
return $found;
}
- function &include_level_or_above($level = null) {
- return $this->_include('_find_level_or_above', $level);
- }
-
- function &exclude_level_or_above($level = null) {
- return $this->_exclude('_find_level_or_above', $level);
- }
-
function _find_only($id = null) {
if (isset($this->_structure[$id])) {
return array($id);
@@ -459,14 +443,6 @@ class ComicPressStoryline {
return array();
}
- function &include_only($id = null) {
- return $this->_include('_find_only', $id);
- }
-
- function &exclude_only($id = null) {
- return $this->_exclude('_find_only', $id);
- }
-
function _find_level($level = null) {
$found = array();
foreach ($this->_structure as $category_id => $info) {
@@ -475,14 +451,6 @@ class ComicPressStoryline {
return $found;
}
- function &include_level($id = null) {
- return $this->_include('_find_level', $id);
- }
-
- function &exclude_level($id = null) {
- return $this->_exclude('_find_level', $id);
- }
-
function _find_post_category($post = null) {
$found = array();
@@ -501,14 +469,6 @@ class ComicPressStoryline {
return $found;
}
- function &include_post_category($post = null) {
- return $this->_include('_find_post_category', $post);
- }
-
- function &exclude_post_category($post = null) {
- return $this->_exclude('_find_post_category', $post);
- }
-
function _find_adjacent($category = null, $next = false) {
$found = array();
@@ -524,15 +484,6 @@ class ComicPressStoryline {
return $found;
}
- function &include_adjacent($category = null, $next = false) {
- return $this->_include('_find_adjacent', $category, $next);
- }
-
- function &exclude_adjacent($category = null, $next = false) {
- return $this->_exclude('_find_adjacent', $category, $next);
- }
-
-
function end_search() {
$result = $this->_category_search;
$this->_category_search = array();
@@ -579,7 +530,8 @@ class ComicPressStoryline {
$method = $method_type; break;
}
if (!empty($method)) {
- call_user_func_array(array($this, "${method_root}_${method}"), $args);
+ array_unshift($args, "_find_${method}");
+ call_user_func_array(array($this, "_${method_root}"), $args);
}
}
}
diff --git a/single.php b/single.php
index b320837..7e108cc 100644
--- a/single.php
+++ b/single.php
@@ -7,7 +7,7 @@
RT('previous', 'from_post'); the_title(); echo '
';
RT('previous'); the_title(); echo '
';
Restore(); the_title(); echo '
';
- RT('next'); the_title(); echo '
';
+ RT('next', array('child_of' => 'amoc')); the_title(); echo '
';
RT('next', 'from_post'); the_title(); echo '
';
RT('last', 'from_post'); the_title(); echo '
';
diff --git a/test/ComicPressStorylineTest.php b/test/ComicPressStorylineTest.php
index 0310634..2db5757 100644
--- a/test/ComicPressStorylineTest.php
+++ b/test/ComicPressStorylineTest.php
@@ -368,26 +368,6 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(array(2,3,4), $this->css->_find_children($search));
}
- function testIncludeChildren() {
- $css = $this->getMock('ComicPressStoryline', array('_find_children'));
- $css->expects($this->once())->method('_find_children')->will($this->returnValue(array(2,3,4)));
- $css->_category_search = array(4,5);
-
- $css->include_children(2);
-
- $this->assertEquals(array(2,3,4,5), $css->_category_search);
- }
-
- function testExcludeChildren() {
- $css = $this->getMock('ComicPressStoryline', array('_find_children'));
- $css->expects($this->once())->method('_find_children')->will($this->returnValue(array(2,3,4)));
- $css->_category_search = array(4, 5, 6);
-
- $css->exclude_children(2);
-
- $this->assertEquals(array(5, 6), $css->_category_search);
- }
-
function testFindLevelOrAbove() {
$this->css->_structure = array(
'1' => array('next' => 2, 'level' => 1),
@@ -399,26 +379,6 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(array(1, 2), $this->css->_find_level_or_above(2));
}
- function testIncludeLevelOrAbove() {
- $css = $this->getMock('ComicPressStoryline', array('_find_level_or_above'));
- $css->expects($this->once())->method('_find_level_or_above')->will($this->returnValue(array(2,3,4)));
- $css->_category_search = array(4,5);
-
- $css->include_level_or_above(2);
-
- $this->assertEquals(array(2,3,4,5), $css->_category_search);
- }
-
- function testExcludeLevelOrAbove() {
- $css = $this->getMock('ComicPressStoryline', array('_find_level_or_above'));
- $css->expects($this->once())->method('_find_level_or_above')->will($this->returnValue(array(2,3,4)));
- $css->_category_search = array(4, 5, 6);
-
- $css->exclude_level_or_above(2);
-
- $this->assertEquals(array(5, 6), $css->_category_search);
- }
-
function testEndSearch() {
$this->css->_category_search = array(1,2,3);
$this->assertEquals(array(1,2,3), $this->css->end_search());
@@ -514,7 +474,7 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
$this->assertEquals($expected_return, $this->css->_find_adjacent($category, $which));
}
- function providerTestBuildFromRestrictions() {
+ function providerTestBuildFromRestrictions() {
return array(
array(
null,