From 31fbddc458a1054c026f0db651cc8a63639f71a9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 1 Jul 2008 20:59:38 +0000 Subject: [PATCH] - Patch #276860 by pwolanin: removed dead code from book module. Does not affect the book module tests. --- modules/book/book.admin.inc | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/modules/book/book.admin.inc b/modules/book/book.admin.inc index cbc5e2c974a..8b5d4e6f3c6 100644 --- a/modules/book/book.admin.inc +++ b/modules/book/book.admin.inc @@ -229,26 +229,3 @@ function theme_book_admin_table($form) { return theme('table', $header, $rows, array('id' => 'book-outline')); } -/** - * Recursive helper to sort each layer of a book tree by weight. - */ -function _book_admin_sort_tree(&$tree) { - uasort($tree, '_book_admin_compare'); - foreach ($tree as $key => $subtree) { - if (!empty($tree[$key]['below'])) { - _book_admin_sort_tree($tree[$key]['below']); - } - } -} - -/** - * Used by uasort() in _book_admin_sort_tree() to compare items in a book tree. - */ -function _book_admin_compare($a, $b) { - $weight = $a['link']['weight'] - $b['link']['weight']; - if ($weight) { - return $weight; - } - - return strncmp($a['link']['title'], $b['link']['title']); -}