better fix

This commit is contained in:
John Bintz 2009-11-10 22:06:35 -05:00
parent 0f9bacb81a
commit 2db40ed8c4
1 changed files with 5 additions and 3 deletions

View File

@ -156,11 +156,13 @@ class ComicPressStoryline {
if (isset($this->_structure[$id])) {
$all_adjacent = array();
do {
$new_id = $this->_structure[$id][$direction];
$has_adjacent = false;
if (!in_array($id, $all_adjacent)) {
if (!in_array($new_id, $all_adjacent)) {
if ($has_adjacent = isset($this->_structure[$id][$direction])) {
$all_adjacent[] = $this->_structure[$id][$direction];
$id = $this->_structure[$id][$direction];
$all_adjacent[] = $new_id;
$id = $new_id;
}
}
} while ($has_adjacent);