Index: helpinject.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/helpinject/helpinject.module,v
retrieving revision 1.23
diff -u -p -w -r1.23 helpinject.module
--- helpinject.module	25 Apr 2009 11:02:04 -0000	1.23
+++ helpinject.module	1 May 2009 06:07:28 -0000
@@ -108,114 +108,6 @@ function helpinject_exporting($exporting
 }
 
 /**
- * Build the table portion of the form for the book administration page.
- *
- * @see book_admin_edit()
- */
-function helpinject_book_table($node, &$form) {
-  $form['table'] = array(
-    '#tree' => TRUE,
-  );
-
-  $tree = book_menu_subtree_data($node->book);
-  $tree = array_shift($tree); // Do not include the book item itself.
-  if ($tree['below']) {
-    $hash = sha1(serialize($tree['below']));
-    // Store the hash value as a hidden form element so that we can detect
-    // if another user changed the book hierarchy.
-    $form['tree_hash'] = array(
-      '#type' => 'hidden',
-      '#default_value' => $hash,
-    );
-    $form['tree_current_hash'] = array(
-      '#type' => 'value',
-      '#value' => $hash,
-    );
-    helpinject_book_table_tree($tree['below'], $form['table']);
-  }
-}
-
-/**
- * Theme function for the book administration page form.
- *
- * @ingroup themeable
- * @see book_admin_table()
- */
-function theme_helpinject_book_table($form) {
-  $header = array(t('Title'), t('Weight'), t('Parent'), array('data' => t('Operations'), 'colspan' => '3'));
-
-  $rows = array();
-  $destination = drupal_get_destination();
-  $access = user_access('administer nodes');
-  foreach (element_children($form) as $key) {
-    $nid = $form[$key]['nid']['#value'];
-    $href = $form[$key]['href']['#value'];
-
-    // Add special classes to be used with tabledrag.js.
-    $form[$key]['plid']['#attributes']['class'] = 'book-plid';
-    $form[$key]['mlid']['#attributes']['class'] = 'book-mlid';
-    $form[$key]['weight']['#attributes']['class'] = 'book-weight';
-
-    $data = array(
-      theme('indentation', $form[$key]['depth']['#value'] - 2) . drupal_render($form[$key]['title']),
-      drupal_render($form[$key]['weight']),
-      drupal_render($form[$key]['plid']) . drupal_render($form[$key]['mlid']),
-      l(t('view'), $href),
-      $access ? l(t('edit'), 'node/'. $nid .'/edit', array('query' => $destination)) : '&nbsp',
-      $access ? l(t('delete'), 'node/'. $nid .'/delete', array('query' => $destination) )  : '&nbsp',
-    );
-    $row = array('data' => $data);
-    if (isset($form[$key]['#attributes'])) {
-      $row = array_merge($row, $form[$key]['#attributes']);
-    }
-    $rows[] = $row;
-  }
-
-  return theme('table', $header, $rows);
-}
-
-/**
- * Recursive helper to build the main table in the book administration page form.
- *
- * @see book_admin_edit()
- */
-function helpinject_book_table_tree($tree, &$form) {
-  foreach ($tree as $data) {
-    $form['book-admin-'. $data['link']['nid']] = array(
-      '#item' => $data['link'],
-      'nid' => array('#type' => 'value', '#value' => $data['link']['nid']),
-      'depth' => array('#type' => 'value', '#value' => $data['link']['depth']),
-      'href' => array('#type' => 'value', '#value' => $data['link']['href']),
-      'title' => array(
-        '#type' => 'textfield',
-        '#default_value' => $data['link']['link_title'],
-        '#maxlength' => 255,
-        '#size' => 40,
-      ),
-      'weight' => array(
-        '#type' => 'weight',
-        '#default_value' => $data['link']['weight'],
-        '#delta' => 15,
-      ),
-      'plid' => array(
-        '#type' => 'textfield',
-        '#default_value' => $data['link']['plid'],
-        '#size' => 6,
-      ),
-      'mlid' => array(
-        '#type' => 'hidden',
-        '#default_value' => $data['link']['mlid'],
-      ),
-    );
-    if ($data['below']) {
-      helpinject_book_table_tree($data['below'], $form);
-    }
-  }
-
-  return $form;
-}
-
-/**
  * @key is either the path, for injecting into the hook_help,
  * or the $form_id + hash.
  */
