Index: book_copy.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/book_copy/book_copy.install,v
retrieving revision 1.1
diff -u -p -r1.1 book_copy.install
--- book_copy.install	31 Oct 2008 00:35:32 -0000	1.1
+++ book_copy.install	6 Oct 2009 20:49:18 -0000
@@ -60,9 +60,25 @@ function book_copy_schema() {
         'not null' => TRUE,
         'default' => 0,
         'description' => t('The datetime this was copied')),
+      'uid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => t('The uid of the user that created the copy.')),
     ),
     'primary key' => array('nid'),
   );
   
   return $schema;
 }
+
+/**
+ * Add the uid field to {book_copy_history} to allow tracking of the user that 
+ * makes the copy.
+ */
+function book_copy_update_6000() {
+  $ret = array();
+  db_add_field($ret, 'book_copy_history', 'uid', array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'description' => t('The uid of the user that created the copy.')));
+  return $ret;
+}
Index: book_copy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/book_copy/book_copy.module,v
retrieving revision 1.1
diff -u -p -r1.1 book_copy.module
--- book_copy.module	31 Oct 2008 00:35:32 -0000	1.1
+++ book_copy.module	6 Oct 2009 20:49:18 -0000
@@ -80,6 +80,7 @@ function book_copy_link($type, $node = N
  * if 
 */
 function book_copy_copy_book($book, $subtree = 0) {
+  global $user;
   $newbid = 0;
 
   if (isset($book->book)) {
@@ -139,7 +140,7 @@ function book_copy_copy_book($book, $sub
     
       // add book copy reference and node copy history
       foreach ($nidmap as $snid => $nid) {
-      db_query('INSERT INTO {book_copy_history} (nid, bid, sbid, snid, copied) VALUES (%d, %d, %d, %d, %d)', $nid, $newbid, $bid, $snid, time());
+      db_query('INSERT INTO {book_copy_history} (nid, bid, sbid, snid, copied, uid) VALUES (%d, %d, %d, %d, %d, %d)', $nid, $newbid, $bid, $snid, time(), $user->uid);
       }
 
       $book = node_load(array('nid' => $newbid));
