--- C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\CMS\Drupal\sites\all\modules\rearrange_child_pages.module 
+++ C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\CMS\Drupal\sites\all\modules\rearrange_child_pages\rearrange_child_pages.module 
@@ -12,6 +12,8 @@
     'page callback' => 'drupal_get_form',
     'page arguments' => array('book_admin_edit', 1),
     'title' => 'Rearrange child pages',
+    'file' => 'book.admin.inc',
+    'file path' => drupal_get_path('module', 'book'),
     'weight' => 5,
     'type' => MENU_LOCAL_TASK,
   );
@@ -21,9 +23,9 @@
 /**
  * Check that node has child pages and that proper permission are there.
  */
-function rearrange_child_pages_access($nid, $type) {
-  $has_children = db_result(db_query('SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $node)); 
-  return $has_children && user_access('administer book outline') && variable_get('rearrange_child_pages_type', 'tab');
+function rearrange_child_pages_access($node, $type) {
+  $has_children = db_result(db_query('SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = %d', $node->nid)); 
+  return $has_children && user_access('administer book outlines') && variable_get('rearrange_child_pages_type', 'tab') == $type;
 }
 
 /**
@@ -35,7 +37,7 @@
   if ($type == 'node' && isset($node->book)) {
     if (!$teaser) {
 
-      if (rearrange_child_pages_access($nid, 'link')) {
+      if (rearrange_child_pages_access($node, 'link')) {
         $links['book_rearrange_child'] = array(
           'title' => t('Rearrange child pages'),
           'href' => "admin/content/book/".$node->nid,
