diff -ur ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.info userpoints_ubercart/uc_userpoints_product.info
--- ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.info	2009-02-11 22:00:36.000000000 -0500
+++ userpoints_ubercart/uc_userpoints_product.info	2009-02-11 22:20:26.000000000 -0500
@@ -1,13 +1,9 @@
 ; $Id: uc_userpoints_product.info,v 1.6 2008/07/10 02:44:25 bmagistro Exp $
 name = Userpoints Product
 description = Provideds necessary modifications to award a user points when a product is purchased if not using workflow-ng
-version = "5.x-1.0"
 package = Ubercart - Userpoints
-dependencies = userpoints uc_order uc_cart uc_payment
-
-
-; Information added by drupal.org packaging script on 2008-07-28
-version = "5.x-2.2"
-project = "userpoints_ubercart"
-datestamp = "1217208620"
-
+dependencies[] = userpoints
+dependencies[] = uc_order
+dependencies[] = uc_cart
+dependencies[] = uc_payment
+core = 6.x
diff -ur ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.install userpoints_ubercart/uc_userpoints_product.install
--- ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.install	2009-02-11 22:00:36.000000000 -0500
+++ userpoints_ubercart/uc_userpoints_product.install	2009-02-11 22:26:44.000000000 -0500
@@ -1,29 +1,22 @@
 <?php
-/* major contributions and development by torgosPizza */
-/**
- * Install the initial schema.
- */
+
+function uc_userpoints_product_schema() {
+  $schema['uc_userpoints_products'] = array(
+    'fields' => array(
+         'upid' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '11'),
+         'pfid' => array('type' => 'int', 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '9'),
+         'nid' => array('type' => 'int', 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '9'),
+         'points' => array('type' => 'int', 'size' => 'medium', 'not null' => TRUE, 'default' => 0, 'disp-width' => '9')),
+    'primary key' => array('upid'),
+  );
+  return $schema;
+}
+
 function uc_userpoints_product_install() {
-	switch ($GLOBALS['db_type']) {
-		case 'mysql':
-		case 'mysqli':
-		 db_query("CREATE TABLE {uc_userpoints_products} (
-		upid int(11) NOT NULL,
-		pfid mediumint(9) NOT NULL default '0',
-		nid mediumint(9) NOT NULL default '0',
-		points mediumint(9) NOT NULL default '0',
-		PRIMARY KEY  (upid)
-			) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;");
-			break;
-		case 'pgsql':
-			break;
-	}
+  drupal_install_schema('uc_userpoints_product');
 }
 
-/**
-* Implementation of hook_uninstall().
-*/
 function uc_userpoints_product_uninstall() {
-	db_query('DROP TABLE {uc_userpoints_products}');
+  drupal_uninstall_schema('uc_userpoints_product');
 }
 
diff -ur ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.module userpoints_ubercart/uc_userpoints_product.module
--- ../userpoints_ubercart-5.x.2.2/uc_userpoints_product.module	2009-02-11 22:00:36.000000000 -0500
+++ userpoints_ubercart/uc_userpoints_product.module	2009-02-11 22:43:26.000000000 -0500
@@ -1,11 +1,10 @@
 <?php
-/* major contributions and development by torgosPizza */
 define('USERPOINTS_PRODUCT_MODERATE',		'userpoints_product_moderate');
 define('USERPOINTS_PRODUCT_CATEGORY',		'userpoints_product_category');
 
 
-function uc_userpoints_product_help($section) {
-  switch ($section) {
+function uc_userpoints_product_help($path, $arg) {
+  switch ($path) {
     case 'admin/modules#description':
       $output = t('<strong>Ubercart Userpoints Product:</strong> Interfaces userpoints with Ubercart, so users can purchase points with products.');
       break;
@@ -64,7 +63,7 @@
 /**
 * Build the userpoints feature form
 */
-function uc_userpoints_product_feature_form($node, $feature) {
+function uc_userpoints_product_feature_form(&$form_state, $node, $feature) {
 	$form['nid'] = array(
 		'#type' => 'value',
 		'#value' => $node->nid,
@@ -79,7 +78,7 @@
 }
 
 
-function uc_userpoints_product_feature_form_validate($form_id, $form_values) {
+function uc_userpoints_product_feature_form_validate($form, &$form_state) {
 	// Not validating anything yet
 }
 
@@ -87,25 +86,18 @@
 /**
 * Submit the form
 */
-function uc_userpoints_product_feature_form_submit($form_id, $form_values) {
-	if (empty($form_values['pfid'])) {
-		$pfid = db_next_id('{uc_product_features}_pfid') + 1;
-	}
-	else {
-		$pfid = $form_values['pfid'];
-	}
-
+function uc_userpoints_product_feature_form_submit($form, &$form_state) {
 	$data = array(
-		'pfid' => $pfid,
-		'nid' => $form_values['nid'],
+		'nid' => $form_state['values']['nid'],
 		'fid' => 'file',
-		'description' => 'Product is now worth '.$form_values['points'].' '.variable_get(USERPOINTS_TRANS_LCPOINTS, 'points'),
+		'description' => 'Product is now worth '.$form_state['values']['points'].' '.variable_get(USERPOINTS_TRANS_LCPOINTS, 'points'),
 	);
 
-	db_query("INSERT INTO {uc_product_features} (pfid, nid, fid, description) VALUES (%d, %d, '%s', '%s')",$pfid,$form_values['nid'],'userpoints',$data['description']);
-	db_query("INSERT INTO {uc_userpoints_products} (upid, pfid, nid, points) VALUES (%d, %d, %d, %d)",db_next_id('{uc_userpoints_products}_upid'),$pfid,$form_values['nid'],$form_values['points']);
+	db_query("INSERT INTO {uc_product_features} (nid, fid, description) VALUES (%d, '%s', '%s')",$form_state['values']['nid'],'userpoints',$data['description']);
+	$data['pfid'] = db_last_insert_id('{uc_product_features}_pfid','pfid');
+	db_query("INSERT INTO {uc_userpoints_products} (pfid, nid, points) VALUES (%d, %d, %d)",$data['pfid'],$form_state['values']['nid'],$form_state['values']['points']);
 
-	return uc_product_feature_save($data);
+	$form_state['redirect'] = uc_product_feature_save($data);
 }
 
 
@@ -165,7 +157,7 @@
 * Check and make sure the user isn't trying to buy points with points.
 *  @todo: Make this configurable?
 */
-function uc_userpoints_product_form_alter($form_id, &$form) {
+function uc_userpoints_product_form_alter(&$form, &$form_state, $form_id) {
   // We may need to alter the checkout form to remove invalid payment methods.
   if ($form_id == 'uc_cart_checkout_form' && isset($form['panes']['payment'])) {
            
@@ -174,10 +166,12 @@
     // Make no changes if no products containing Userpoints are found.
     if (uc_userpoints_find_points_products($order) == array()) {
       return;
-    } else {
-            unset($form['panes']['payment']['payment_method']['#options']['points']);
-            drupal_set_message(t('You cannot purchase !Points with !Points, so that payment option has been removed.', userpoints_translation(), userpoints_translation()));
-        }
+    }
+
+    if (isset($form['panes']['payment']['payment_method']['#options']['points'])) {
+      unset($form['panes']['payment']['payment_method']['#options']['points']);
+      drupal_set_message(t('You cannot purchase !Points with !Points, so that payment option has been removed.', userpoints_translation(), userpoints_translation()));
+    }
        
     $count = count($form['panes']['payment']['payment_method']['#options']);
     if ($count == 0) {
@@ -219,4 +213,4 @@
   }
 
   return $pointsproducts;
-}
\ No newline at end of file
+}