Index: webfm_statistics.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webfm_statistics/webfm_statistics.install,v
retrieving revision 1.1
diff -u -r1.1 webfm_statistics.install
--- webfm_statistics.install	21 Feb 2009 14:34:54 -0000	1.1
+++ webfm_statistics.install	28 Apr 2009 01:43:25 -0000
@@ -4,22 +4,30 @@
 /** 
  * Implementation of hook_install().
  */
-function webfm_statistics_install(){
+function webfm_statistics_install() {
   drupal_install_schema('webfm_statistics');
 } 
 
-function webfm_statistcs_schema(){
+/**
+ * Implementation of hook_uninstall().
+ */
+function webfm_statistics_uninstall() {
+  drupal_uninstall_schema('webfm_statistics');
+}
+
+/**
+ * Implementation of hook_schema().
+ */
+function webfm_statistics_schema() {
   $schema['webfm_statistics'] = array(
    'fields' => array(
-      'sid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE),
-      'uid' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
+      'sid' => array('type' => 'serial', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE),
+      'uid' => array('type' => 'int', 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
       'fid' => array( 'type' => 'int', 'size' => 'normal', 'not null' => TRUE, 'default' => 0),
-      'dl_time' => array( 'type' => 'datetime', 'not null' => TRUE, 'default' => '0000-00-00 00:00:00'),
+      'dl_time' => array('type' => 'int', 'size' => 'normal', 'not null' => TRUE, 'default' => 0),
    ),
    'primary key' => array('sid'),
   );
 
   return $schema;
 }
-
-?>
Index: webfm_statistics.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webfm_statistics/webfm_statistics.module,v
retrieving revision 1.1
diff -u -r1.1 webfm_statistics.module
--- webfm_statistics.module	21 Feb 2009 14:34:54 -0000	1.1
+++ webfm_statistics.module	28 Apr 2009 01:42:38 -0000
@@ -48,8 +48,8 @@
   //we need our user
   global $user;
   //simple query to record this down load
-  $query = "INSERT INTO {webfm_statistics} (uid, fid, dl_time) VALUES (%d, %d, NOW())";
-  $result = db_query($query, $user->uid, $file->fid);
+  $query = "INSERT INTO {webfm_statistics} (uid, fid, dl_time) VALUES (%d, %d, %d)";
+  $result = db_query($query, $user->uid, $file->fid, time());
 }
 
 /*
@@ -125,7 +125,8 @@
     $mail_link = l($data->mail, "mailto:$data->mail");
     $node_link = l($data->title, "/node/$data->nid");
 
-    $rows[] = array( $data->fmime, $data->dl_time, $name_link, $mail_link, '[ FID: '.$data->fid.' ] '.$flink, $node_link);
+    $time = date("F j, Y, g:i a", $data->dl_time);
+    $rows[] = array( $data->fmime, $time, $name_link, $mail_link, '[ FID: '.$data->fid.' ] '.$flink, $node_link);
   }
 
   if (empty($rows)) {
@@ -142,13 +143,13 @@
  * Menu callback: confirm wiping of the .
  */
 function webfm_statistics_delete_report_confirm() {
-  return confirm_form(array(), t('Are you sure you want to delete the webfm statistical data?'), 'admin/reports/webfm_statistics', t('This action will delete data from the data base and cannot be undone.  If you are unsure about this action, do not delete this data.  Alternatively, you should at least export as a .csv file which will make it possible to restore.'), t('Delete Data'), t('Cancel'));
+  return confirm_form(array(), t('Are you sure you want to delete the webfm statistical data?'), 'admin/reports/webfm_statistics_delete_report_confirm_submit', t('This action will delete data from the data base and cannot be undone.  If you are unsure about this action, do not delete this data.  Alternatively, you should at least export as a .csv file which will make it possible to restore.'), t('Delete Data'), t('Cancel'));
 }
 
 /**
  * Delete confirmation and action functions
  */
-function webfm_delete_report_confirm_submit(&$form, &$form_state) {
+function webfm_statistics_delete_report_confirm_submit(&$form, &$form_state) {
   if ($form['confirm']) {
     webfm_statistics_delete_report();
     $form_state['redirect'] = 'admin/reports/webfm_statistics';
