Index: uc_recurring.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/uc_recurring.admin.inc,v
retrieving revision 1.1.4.20.2.1
diff -u -p -r1.1.4.20.2.1 uc_recurring.admin.inc
--- uc_recurring.admin.inc	8 Dec 2010 15:55:50 -0000	1.1.4.20.2.1
+++ uc_recurring.admin.inc	17 Feb 2011 13:41:03 -0000
@@ -13,7 +13,7 @@ function uc_recurring_admin($filter = NU
   $item = menu_get_item();
 
   // Add the filter form to the top of the table.
-  $output .= drupal_get_form('uc_recurring_admin_filter_form', $item);
+  $output = drupal_get_form('uc_recurring_admin_filter_form', $item);
 
   // Build an array of fees to include in the admin table.
   $fees = array();
@@ -49,8 +49,7 @@ function uc_recurring_admin($filter = NU
   // If we're on the overview page listing all fees...
   if (empty($filter)) {
     // Get all recurring fees in the system.
-    $order = tablesort_sql($header);
-    $fees = uc_recurring_get_all_fees(TRUE, $order);
+    $fees = uc_recurring_get_all_fees(TRUE, $header);
     $footer_link = FALSE;
   }
   elseif ($filter == 'order') {
@@ -66,7 +65,7 @@ function uc_recurring_admin($filter = NU
 
   // If we actually found fees to display...
   if (!empty($fees)) {
-    $output .= theme('uc_recurring_admin_table', array('fees' => array('fees' => $fees)));
+    $output .= theme('uc_recurring_admin_table', array('fees' => $fees));
   }
 
   // Display a link back to the full list if necessary.
@@ -135,7 +134,7 @@ function uc_recurring_admin_charge_form(
       '#type' => 'hidden',
       '#value' => $rfid,
     );
-    $form['message'] = array (
+    $form['message'] = array(
       '#markup' => '<div>' . t('Are you sure you want to charge the customer !amount at this time?', array('!amount' => theme('uc_price', $fee->fee_amount))) . '</div>',
     );
     $form['submit'] = array(
@@ -321,10 +320,10 @@ function uc_recurring_admin_edit_form_su
   if ($form_state['values']['reset_next_charge']) {
     $next_charge = strtotime('+' . $interval);
   }
-  else if (!empty($form_state['values']['next_charge_time'])) {
+  elseif (!empty($form_state['values']['next_charge_time'])) {
     $next_charge = strtotime($form_state['values']['next_charge_time']);
   }
-  else if (!empty($form_state['values']['next_charge_date'])) {
+  elseif (!empty($form_state['values']['next_charge_date'])) {
     extract($form_state['values']['next_charge_date']);
     $hour = date('H', $fee->next_charge);
     $min = date('i', $fee->next_charge);
Index: uc_recurring.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/uc_recurring.info,v
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4.2.1 uc_recurring.info
--- uc_recurring.info	8 Dec 2010 15:55:50 -0000	1.1.4.4.2.1
+++ uc_recurring.info	17 Feb 2011 13:41:03 -0000
@@ -17,3 +17,10 @@ files[] = includes/uc_recurring.test_gat
 files[] = includes/uc_recurring.uc_authorizenet.inc
 files[] = includes/uc_recurring.uc_credit.inc
 files[] = includes/uc_recurring.uc_payment_pack.inc
+
+; Information added by drupal.org packaging script on 2010-12-09
+version = "7.x-2.x-dev"
+core = "7.x"
+project = "uc_recurring"
+datestamp = "1291854492"
+
Index: uc_recurring.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/uc_recurring.module,v
retrieving revision 1.1.4.87.2.1
diff -u -p -r1.1.4.87.2.1 uc_recurring.module
--- uc_recurring.module	8 Dec 2010 15:55:50 -0000	1.1.4.87.2.1
+++ uc_recurring.module	17 Feb 2011 13:41:03 -0000
@@ -561,22 +561,22 @@ function uc_recurring_save_extensions($e
     // TODO Please review the conversion of this statement to the D7 database API syntax.
     /* db_query("INSERT INTO {uc_recurring_extensions} (rebill_attempt, time_to_extend) VALUES (%d, %d)", $count, $seconds) */
     $id = db_insert('uc_recurring_extensions')
-  ->fields(array(
-      'rebill_attempt' => $count,
-      'time_to_extend' => $seconds,
-    ))
-  ->execute();
+      ->fields(array(
+        'rebill_attempt' => $count,
+        'time_to_extend' => $seconds,
+      ))
+      ->execute();
     $count++;
   }
   // Last extension set extension to 0 to expire.
   // TODO Please review the conversion of this statement to the D7 database API syntax.
   /* db_query("INSERT INTO {uc_recurring_extensions} (rebill_attempt, time_to_extend) VALUES (%d, 0)", $count) */
   $id = db_insert('uc_recurring_extensions')
-  ->fields(array(
-    'rebill_attempt' => $count,
-    'time_to_extend' => 0,
-  ))
-  ->execute();
+    ->fields(array(
+      'rebill_attempt' => $count,
+      'time_to_extend' => 0,
+    ))
+    ->execute();
 }
 
 /**
@@ -586,6 +586,7 @@ function uc_recurring_save_extensions($e
  *   Array keyed by the implementing module, and the callback.
  */
 function uc_recurring_get_recurring_info($key = '', $reset = FALSE) {
+
   static $data = array();
 
   if ($reset || ($key && empty($data[$key])) || (!$key && empty($data))) {
@@ -717,7 +718,7 @@ function uc_recurring_fee_user_save($fee
  *   The recurring fee object.
  */
 function uc_recurring_fee_user_load($rfid) {
-  $fee = db_query("SELECT * FROM {uc_recurring_users} WHERE rfid = :rfid", array(':rfid' => $rfid))->fetchObject();
+  $fee = db_query("SELECT ru.*, u.name FROM {uc_recurring_users} ru JOIN users u ON u.uid = ru.uid WHERE rfid = :rfid", array(':rfid' => $rfid))->fetchObject();
   if ($fee) {
     $fee->data = unserialize($fee->data);
 
@@ -797,10 +798,12 @@ function uc_recurring_get_fees($order, $
         $products[$value->order_product_id] = $value->order_product_id;
       }
 
-      // TODO Please convert this statement to the D7 database API syntax.
+      $products[] = 1;
+      // TODO Please review the conversion of this statement to the D7 database API syntax.
       $result = db_query("SELECT ru.*, u.name FROM {uc_recurring_users} ru LEFT JOIN {users} u ON u.uid=ru.uid WHERE order_product_id IN (:products)", array(':products' => $products));
-      if (!empty($results)) {
-        foreach ($results as $fee) {
+
+      if (!empty($result)) {
+        foreach ($result as $fee) {
           $fee->data = unserialize($fee->data);
           $fees[$order->order_id][] = $fee;
         }
@@ -842,14 +845,21 @@ function uc_recurring_get_fees_for_expir
  */
 function uc_recurring_get_all_fees($pager = FALSE, $order = '') {
   $fees = array();
-  $sql = "SELECT ru.*, u.name FROM {uc_recurring_users} ru LEFT JOIN {users} u ON u.uid=ru.uid" . $order;
+  //$sql = "SELECT ru.*, u.name FROM {uc_recurring_users} ru LEFT JOIN {users} u ON u.uid=ru.uid" . $order;
+  $query = db_select('uc_recurring_users', 'ru');
   if ($pager) {
-    $result = pager_query($sql, variable_get('uc_order_number_displayed', 30));
-  }
-  else {
-    // TODO Please convert this statement to the D7 database API syntax.
-    $result = db_query($sql);
+    $query->extend('PagerDefault');
   }
+
+  // add the order header
+  $query->extend('TableSort')
+    ->orderByHeader($order)
+    ->fields('ru')
+    ->fields('u', array('name'))
+    ->join('users', 'u', 'u.uid = ru.uid');
+
+  $result = $query->execute();
+
   foreach ($result as $fee) {
     $fees[$fee->rfid] = $fee;
     $fee->data = unserialize($fee->data);
@@ -1028,7 +1038,8 @@ function theme_uc_recurring_admin_table(
       $recurring_states[$fee->status],
       l($fee->name, 'user/' . $fee->uid),
       format_date($fee->next_charge, 'short'),
-      $fee->fee_amount != '0.00' ? theme('uc_price', $fee->fee_amount) : t('Same as product price'),
+      $fee->fee_amount != '0.00' ? $fee->fee_amount : t('Same as product price'),
+      //$fee->fee_amount != '0.00' ? theme('uc_price', $fee->fee_amount) : t('Same as product price'),
       array(
         'data' => check_plain($fee->regular_interval),
         'nowrap' => 'nowrap',
Index: uc_recurring.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/Attic/uc_recurring.test,v
retrieving revision 1.1.2.8.2.1
diff -u -p -r1.1.2.8.2.1 uc_recurring.test
--- uc_recurring.test	8 Dec 2010 15:55:50 -0000	1.1.2.8.2.1
+++ uc_recurring.test	17 Feb 2011 13:41:03 -0000
@@ -6,7 +6,8 @@
  * UC Recurring simpletest
  */
 
-class ucRecurringTestCase extends UbercartTestCase {
+//class ucRecurringTestCase extends UbercartTestCase {
+class ucRecurringTestCase extends DrupalWebTestCase {
 
   /**
    * Add a recurring feature to a product.
Index: modules/uc_recurring_product/uc_recurring_product.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/modules/uc_recurring_product/Attic/uc_recurring_product.module,v
retrieving revision 1.1.2.8.2.1
diff -u -p -r1.1.2.8.2.1 uc_recurring_product.module
--- modules/uc_recurring_product/uc_recurring_product.module	8 Dec 2010 15:55:51 -0000	1.1.2.8.2.1
+++ modules/uc_recurring_product/uc_recurring_product.module	17 Feb 2011 13:41:03 -0000
@@ -200,7 +200,7 @@ function uc_recurring_product_feature_sa
 
   $args = array(
     '@product' => empty($product->model) ? t('this product') : t('@model of this product', array('@model' => $product->model)),
-    '@amount' => empty($product->fee_amount) ? t('the same amount as the product selling price') : uc_price($product->fee_amount, $context),
+    '@amount' => empty($product->fee_amount) ? t('the same amount as the product selling price') : theme('uc_price', $product->fee_amount, $context),
     '@initial' => $product->initial_charge,
     '@regular' => $product->regular_interval,
     '@intervals' => t('@num times', array('@num' => $product->number_intervals < 0 ? t('unlimited') : $product->number_intervals - 1)),
Index: modules/uc_recurring_subscription/uc_recurring_subscription.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/modules/uc_recurring_subscription/Attic/uc_recurring_subscription.info,v
retrieving revision 1.1.2.1.2.1
diff -u -p -r1.1.2.1.2.1 uc_recurring_subscription.info
--- modules/uc_recurring_subscription/uc_recurring_subscription.info	8 Dec 2010 15:55:51 -0000	1.1.2.1.2.1
+++ modules/uc_recurring_subscription/uc_recurring_subscription.info	17 Feb 2011 13:41:03 -0000
@@ -12,3 +12,10 @@ files[] = uc_recurring_subscription.admi
 files[] = uc_recurring_subscription.ca.inc
 files[] = uc_recurring_subscription.install
 files[] = uc_recurring_subscription.module
+
+; Information added by drupal.org packaging script on 2010-12-09
+version = "7.x-2.x-dev"
+core = "7.x"
+project = "uc_recurring"
+datestamp = "1291854492"
+
Index: modules/uc_recurring_subscription/uc_recurring_subscription.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/modules/uc_recurring_subscription/Attic/uc_recurring_subscription.install,v
retrieving revision 1.1.2.1.2.1
diff -u -p -r1.1.2.1.2.1 uc_recurring_subscription.install
--- modules/uc_recurring_subscription/uc_recurring_subscription.install	8 Dec 2010 15:55:51 -0000	1.1.2.1.2.1
+++ modules/uc_recurring_subscription/uc_recurring_subscription.install	17 Feb 2011 13:41:03 -0000
@@ -98,7 +98,7 @@ function uc_recurring_subscription_unins
 function uc_recurring_subscription_enable() {
   $pcid = 'uc_recurring_subscription';
 
-  if (db_query("SELECT count(*) FROM {uc_product_classes} WHERE pcid = :pcid", array(':pcid' => : pcid, '' => array(':pcid' => $pcid)))->fetchField() < 1) {
+  if (db_query("SELECT count(*) FROM {uc_product_classes} WHERE pcid = :pcid", array(':pcid' => $pcid))->fetchField() < 1) {
     // TODO Please review the conversion of this statement to the D7 database API syntax.
     /* db_query("INSERT INTO {uc_product_classes} (pcid, name, description) VALUES ('%s', 'Recurring Subscription', 'A recurring subscription product used by the recurring subscription ui module to manage your subscription products')", $pcid) */
     $id = db_insert('uc_product_classes')
Index: modules/uc_recurring_subscription/uc_recurring_subscription.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_recurring/modules/uc_recurring_subscription/Attic/uc_recurring_subscription.module,v
retrieving revision 1.1.2.1.2.1
diff -u -p -r1.1.2.1.2.1 uc_recurring_subscription.module
--- modules/uc_recurring_subscription/uc_recurring_subscription.module	8 Dec 2010 15:55:51 -0000	1.1.2.1.2.1
+++ modules/uc_recurring_subscription/uc_recurring_subscription.module	17 Feb 2011 13:41:03 -0000
@@ -142,7 +142,7 @@ function uc_recurring_subscription_attri
 function uc_recurring_subscription_load($nidss) {
   // ERROR: return statement not found in hook_load
   foreach ($nids as $nid => &$nid) {
-    $subscription = db_query("SELECT * FROM {uc_recurring_subscription} WHERE nid = :nid", array(':nid' => : nid, '' => array(':nid' => $nid)))->fetchObject();
+    $subscription = db_query("SELECT * FROM {uc_recurring_subscription} WHERE nid = :nid", array(':nid' => $nid))->fetchObject();
     if (!empty($subscription)) {
       $subscription->access = empty($subscription->access) ? array() : unserialize($subscription->access);
     }
@@ -255,7 +255,7 @@ function _uc_recurring_subscription_attr
   $option = db_query("SELECT * from {uc_attribute_options} WHERE aid = :aid AND name = :name", array(
       ':aid' => $aid,
       ':name' => $name,
-    )))->fetchObject();
+    ))->fetchObject();
   // If it doesn't exist we create it.
   if (empty($option)) {
     $option = new stdClass();
