Permalink
Browse files

Fixes incorrect siblings_and_self collections

  • Loading branch information...
1 parent c857d7d commit 45bca067cf937c2b5142c96947d66dd2b641297e @kolber committed Apr 4, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/page-data.inc.php
View
@@ -161,7 +161,7 @@ static function create_collections($page) {
$page->siblings_and_self = Helpers::list_files($parent_path, '/^\d+?\./', true);
# page.next_siblings / page.previous_siblings
$index = self::get_index($page->data['siblings_and_self'], $page->file_path);
- $page->previous_siblings = array_slice($page->data['siblings_and_self'], 0, $index, true);
+ $page->previous_siblings = array_slice($page->data['siblings_and_self'], 0, $index - 1, true);
$page->next_siblings = array_slice($page->data['siblings_and_self'], $index, count($page->data['siblings_and_self']), true);
# page.next_sibling / page.previous_sibling
$neighboring_siblings = self::extract_closest_siblings($page->data['siblings_and_self'], $page->file_path);

0 comments on commit 45bca06

Please sign in to comment.