Binary files /home/sjohnston/amazontools/.nfs01c5581f00000653 and amazontools/.nfs01c5581f00000653 differ
diff -urN /home/sjohnston/amazontools/amazon.install amazontools/amazon.install
--- /home/sjohnston/amazontools/amazon.install	2006-08-06 18:01:50.000000000 -0700
+++ amazontools/amazon.install	2006-10-28 11:56:18.000000000 -0700
@@ -41,6 +41,7 @@
         formattedprice varchar(10) default NULL,
         availability varchar(50) default NULL,
         pricedate datetime default NULL,
+	publicationdate datetime default NULL,
         PRIMARY KEY  (asin),
         KEY Title (title)
       )  /*!40100 DEFAULT CHARACTER SET utf8 */ ");
@@ -76,6 +77,7 @@
         formattedprice varchar(10) default '',
         availability varchar(50) default '',
         pricedate timestamp,
+        publication timestamp,
         PRIMARY KEY (asin)
       );");
     db_query("CREATE INDEX {amazonitem_title_idx} ON {amazonitem} (title);");
@@ -138,4 +140,4 @@
   $ret[] = update_sql("UPDATE {amazonnode} SET ntype = 'amazon_node' WHERE ntype = 'amazon-node'");
   return $ret;
 }
-?>
\ No newline at end of file
+?>
diff -urN /home/sjohnston/amazontools/amazon.module amazontools/amazon.module
--- /home/sjohnston/amazontools/amazon.module	2006-10-26 10:03:01.000000000 -0700
+++ amazontools/amazon.module	2006-10-28 12:17:01.000000000 -0700
@@ -148,7 +148,7 @@
              "largeimageurl = '%s', largeimageheight = %d, largeimagewidth = %d, ".
              "author = '%s', editorialreview = '%s', binding = '%s', listamount = %d, listcurrencycode = '%s', " .
              "listformattedprice = '%s', amount = %d, currencycode = '%s', " .
-             "formattedprice = '%s', pricedate = now()" .
+             "formattedprice = '%s', pricedate = now(), publicationdate = '%s' " .
              "where asin = '%s'",
              $Amazonitem->detailpageurl,
              $Amazonitem->smallimageurl, $Amazonitem->smallimageheight, $Amazonitem->smallimagewidth,
@@ -158,6 +158,7 @@
              $Amazonitem->listamount, $Amazonitem->listcurrencycode,
              $Amazonitem->listformattedprice, $Amazonitem->amount ? $Amazonitem->amount: $Amazonitem->listamount, $Amazonitem->currencycode,
              $Amazonitem->formattedprice ? $Amazonitem->formattedprice: $Amazonitem->listformattedprice, /* time(),*/
+	     $Amazonitem->publicationdate,
              $Amazonitem->asin);
 }
 /**
@@ -482,7 +483,8 @@
              largeimageurl, largeimageheight, largeimagewidth,
              author, editorialreview, binding, listamount,
              listcurrencycode, listformattedprice, title,
-             amount, currencycode, formattedprice, pricedate, availability)
+             amount, currencycode, formattedprice, pricedate, availability,
+	     publicationdate)
              VALUES ('%s', '%s',
              '%s', %d, %d,
              '%s', %d, %d,
@@ -490,7 +492,7 @@
              '%s', '%s', '%s', %d,
              '%s', '%s', '%s',
              %d, '%s', '%s',
-             '%s', '%s')",
+             '%s', '%s', '%s')",
              $amazon_data->asin, $amazon_data->detailpageurl,
              db_escape_string($amazon_data->smallimageurl), $amazon_data->smallimageheight, $amazon_data->smallimagewidth,
              db_escape_string($amazon_data->mediumimageurl), $amazon_data->mediumimageheight, $amazon_data->mediumimagewidth,
@@ -500,7 +502,7 @@
              $amazon_data->listcurrencycode, $amazon_data->listformattedprice, $amazon_data->title,
              $amazon_data->amount ? $amazon_data->amount: $amazon_data->listamount, $amazon_data->currencycode,
              $amazon_data->formattedprice ? $amazon_data->formattedprice: $amazon_data->listformattedprice,
-             date('Y-m-d H:i:s'), $amazon_data->availability);
+             date('Y-m-d H:i:s'), $amazon_data->availability, $amazon_data->publicationdate);
   }
   $rating = $node->rating ? $node->rating : 0;
   db_query("INSERT INTO {amazonnode} (nid, asin, ntype, rating) VALUES (%d, '%s', '%s', %d)", $node->nid, $node->asin, $node->type, $rating);
@@ -1023,6 +1025,9 @@
   if ($amazonitem->binding) {
     $output .= '<strong>' . t('binding') . ":</strong> $amazonitem->binding <br />";
   }
+  if ($amazonitem->publicationdate) {
+    $output .= '<strong>' . t('publicationdate') . ":</strong> $amazonitem->publicationdate <br />";
+  }
   if ($amazonitem->listformattedprice) {
     $output .= '<strong>' . t('list price') . ":</strong> $amazonitem->listformattedprice $amazonitem->listcurrencycode <br />";
   }
@@ -1070,6 +1088,9 @@
   if ($node->binding) {
     $datacell .= "binding: $node->binding <br />";
   }
+  if ($node->publicationdate) {
+    $datacell .= "publicationdate: $node->publicationdate <br />";
+  }
   if ($node->listformattedprice) {
     $datacell .= "list price: $node->listformattedprice $node->listcurrencycode <br />";
   }
@@ -1373,6 +1396,9 @@
   if ($node->binding) {
     $output .= "binding: $node->binding <br />";
   }
+  if ($node->publicationdate) {
+    $output .= "publicationdate: $node->publicationdate <br />";
+  }
   if ($node->listformattedprice) {
     $output .= "list price: $node->listformattedprice $node->listcurrencycode <br />";
   }
diff -urN /home/sjohnston/amazontools/amazon.php4.inc amazontools/amazon.php4.inc
--- /home/sjohnston/amazontools/amazon.php4.inc	2006-10-13 18:01:58.000000000 -0700
+++ amazontools/amazon.php4.inc	2006-10-28 12:08:11.000000000 -0700
@@ -144,6 +144,7 @@
           break;
         }
         case 'Binding':
+        case 'PublicationDate':
         case 'Title':
         case 'DetailPageURL':{
           $Amazon_ItemAttributes[strtolower($ItemAttributesData->tagname())] = _amazon_element_content($ItemAttributesData);
@@ -341,4 +342,4 @@
     return _amazon_items_array_from_DOM($_amazon_search_amazonDOM);
   }
 
-?>
\ No newline at end of file
+?>
diff -urN /home/sjohnston/amazontools/amazon.php5.inc amazontools/amazon.php5.inc
--- /home/sjohnston/amazontools/amazon.php5.inc	2006-10-13 18:01:58.000000000 -0700
+++ amazontools/amazon.php5.inc	2006-10-28 12:08:25.000000000 -0700
@@ -144,6 +144,7 @@
           break;
         }
         case 'Binding':
+        case 'PublicationDate':
         case 'Title':
         case 'DetailPageURL':{
           $Amazon_ItemAttributes[strtolower($ItemAttributesData->nodeName)] = _amazon_element_content($ItemAttributesData);
@@ -343,4 +344,4 @@
     return _amazon_items_array_from_DOM($_amazon_search_amazonDOM);
   }
 
-?>
\ No newline at end of file
+?>
diff -urN /home/sjohnston/amazontools/amazon_views.inc amazontools/amazon_views.inc
--- /home/sjohnston/amazontools/amazon_views.inc	2006-06-22 10:02:29.000000000 -0700
+++ amazontools/amazon_views.inc	2006-10-28 11:58:31.000000000 -0700
@@ -112,6 +112,10 @@
         'name' => t('Amazon: Availability'),
         'sortable' => TRUE,
       ),
+      'publicationdate' => array(
+        'name' => t('Amazon: Publication Date'),
+        'sortable' => TRUE,
+      ),
     ),
   );
 
@@ -156,4 +160,4 @@
   $alt =  $data->amazonitem_title . ' ' . t('cover image');
   $image = theme('image', $value, $alt, $title, $attributes, FALSE);
   return l($image, $data->amazonitem_detailpageurl, array(), NULL, NULL, FALSE, TRUE);
-}
\ No newline at end of file
+}
