? .git
Index: uc_attribute/uc_attribute.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_attribute/uc_attribute.module,v
retrieving revision 1.12.2.2
diff -u -p -r1.12.2.2 uc_attribute.module
--- uc_attribute/uc_attribute.module	14 Aug 2008 21:08:47 -0000	1.12.2.2
+++ uc_attribute/uc_attribute.module	7 Jan 2009 22:12:57 -0000
@@ -214,7 +214,7 @@ function uc_attribute_theme() {
 function uc_attribute_form_alter(&$form, &$form_state, $form_id) {
   if (strpos($form_id, 'add_to_cart_form') || strpos($form_id, 'add_product_form')) {
     // If the node has a product list, add attributes to them
-    if (count(element_children($form['products']))) {
+    if (!empty($form['products']) && count(element_children($form['products']))) {
       foreach (element_children($form['products']) as $key) {
         $form['products'][$key] = _uc_attribute_alter_form($form['products'][$key]);
         if (isset($form['products'][$key]['attributes'])) {
Index: uc_google_checkout/uc_google_checkout.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_google_checkout/Attic/uc_google_checkout.info,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 uc_google_checkout.info
--- uc_google_checkout/uc_google_checkout.info	6 Aug 2008 13:41:34 -0000	1.1.2.3
+++ uc_google_checkout/uc_google_checkout.info	3 Sep 2008 18:58:40 -0000
@@ -1,5 +1,6 @@
 ; $Id: uc_google_checkout.info,v 1.1.2.3 2008/08/06 13:41:34 islandusurper Exp $
 name = Google Checkout
 description = Integrates Google's Checkout, Merchant Calculated Shipping, and Order Processing APIs.
-dependencies = uc_cart
+dependencies[] = uc_cart
 package = Ubercart - payment
+core = "6.x"
\ No newline at end of file
Index: uc_importer/uc_importer.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_importer/uc_importer.info,v
retrieving revision 1.4
diff -u -p -r1.4 uc_importer.info
--- uc_importer/uc_importer.info	5 Nov 2007 20:31:58 -0000	1.4
+++ uc_importer/uc_importer.info	3 Sep 2008 18:58:34 -0000
@@ -2,4 +2,5 @@
 name = Importer
 description = Provides an interface to import and export XML representations of the store's contents.
 package = Ubercart - extra
-dependencies = uc_product
+dependencies[] = uc_product
+core = "6.x"
\ No newline at end of file
Index: uc_notify/uc_notify.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_notify/uc_notify.info,v
retrieving revision 1.6
diff -u -p -r1.6 uc_notify.info
--- uc_notify/uc_notify.info	10 Jul 2008 12:41:02 -0000	1.6
+++ uc_notify/uc_notify.info	3 Sep 2008 18:58:28 -0000
@@ -1,6 +1,8 @@
 ; $Id: uc_notify.info,v 1.6 2008/07/10 12:41:02 islandusurper Exp $
 name = Notify
 description = Send checkout and order email notifications to customers and administrators.
-dependencies = uc_store uc_order token
+dependencies[] = uc_store
+dependencies[] = uc_order
+dependencies[] = token
 package = "Ubercart - core (optional)"
-
+core = "6.x"
Index: uc_order/uc_order.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_order/uc_order.module,v
retrieving revision 1.12.2.2
diff -u -p -r1.12.2.2 uc_order.module
--- uc_order/uc_order.module	14 Aug 2008 21:08:48 -0000	1.12.2.2
+++ uc_order/uc_order.module	7 Jan 2009 22:10:01 -0000
@@ -308,6 +308,7 @@ function uc_order_theme() {
  * Implementation of hook_token_values(). (token.module)
  */
 function uc_order_token_values($type, $object = NULL) {
+  $values = array();
   switch ($type) {
     case 'order':
       $order = $object;
@@ -370,6 +371,7 @@ function uc_order_token_values($type, $o
  * Implementation of hook_token_list(). (token.module)
  */
 function uc_order_token_list($type = 'all') {
+  $tokens = array();
   if ($type == 'order' || $type == 'ubercart' || $type == 'all') {
     $tokens['order']['new-username'] = t('New username associated with an order if applicable.');
     $tokens['order']['new-password'] = t('New password associated with an order if applicable.');
Index: uc_product/uc_product.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_product/uc_product.module,v
retrieving revision 1.14.2.5
diff -u -p -r1.14.2.5 uc_product.module
--- uc_product/uc_product.module	14 Aug 2008 21:08:48 -0000	1.14.2.5
+++ uc_product/uc_product.module	7 Jan 2009 22:24:10 -0000
@@ -147,9 +147,10 @@ function uc_product_menu() {
  */
 function uc_product_help($path, $arg) {
   // Do things here later. Figure out what you need to say for each section.
+  $output = '';
   switch ($path) {
     case 'admin/settings/module#description':
-      $output = t('Create products for sale in an online store.');
+      $output .= t('Create products for sale in an online store.');
       break;
   }
   return $output;
@@ -452,7 +453,7 @@ function uc_product_form(&$node) {
   $form['base']['model'] = array('#type' => 'textfield',
     '#title' => t('SKU'),
     '#required' => TRUE,
-    '#default_value' => $node->model,
+    '#default_value' => empty($node->model) ? '' : $node->model,
     '#description' => t('Product SKU/model.'),
     '#weight' => 0,
     '#size' => 32,
@@ -467,7 +468,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('List price'),
     '#required' => FALSE,
-    '#default_value' => $node->list_price,
+    '#default_value' => empty($node->list_price) ? 0 : $node->list_price,
     '#description' => t('The listed MSRP.'),
     '#weight' => 0,
     '#size' => 20,
@@ -479,7 +480,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('Cost'),
     '#required' => FALSE,
-    '#default_value' => $node->cost,
+    '#default_value' => empty($node->cost) ? 0 : $node->cost,
     '#description' => t("Your store's cost."),
     '#weight' => 1,
     '#size' => 20,
@@ -491,7 +492,7 @@ function uc_product_form(&$node) {
     '#type' => 'textfield',
     '#title' => t('Sell price'),
     '#required' => TRUE,
-    '#default_value' => $node->sell_price,
+    '#default_value' => empty($node->sell_price) ? 0 : $node->sell_price,
     '#description' => t('Customer purchase price.'),
     '#weight' => 2,
     '#size' => 20,
@@ -513,7 +514,7 @@ function uc_product_form(&$node) {
   );
   $form['base']['weight']['weight'] = array('#type' => 'textfield',
     '#title' => t('Weight'),
-    '#default_value' => $node->weight,
+    '#default_value' => empty($node->weight) ? 0 : $node->weight,
     '#size' => 10,
     '#maxlength' => 15,
   );
@@ -525,7 +526,7 @@ function uc_product_form(&$node) {
   );
   $form['base']['weight']['weight_units'] = array('#type' => 'select',
     '#title' => t('Unit of measurement'),
-    '#default_value' => $node->weight_units ? $node->weight_units : variable_get('uc_weight_unit', 'lb'),
+    '#default_value' => empty($node->weight_units) ? variable_get('uc_weight_unit', 'lb') : $node->weight_units,
     '#options' => $units,
   );
   $form['base']['dimensions'] = array('#type' => 'fieldset',
@@ -542,32 +543,32 @@ function uc_product_form(&$node) {
       'cm' => t('Centimeters'),
       'mm' => t('Millimeters'),
     ),
-    '#default_value' => $node->length_units ? $node->length_units : variable_get('uc_length_unit', 'in'),
+    '#default_value' => empty($node->length_units) ? variable_get('uc_length_unit', 'in') : $node->length_units,
   );
   $form['base']['dimensions']['length'] = array('#type' => 'textfield',
     '#title' => t('Length'),
-    '#default_value' => $node->length,
+    '#default_value' => empty($node->length) ? 0 : $node->length,
     '#size' => 10,
   );
   $form['base']['dimensions']['width'] = array('#type' => 'textfield',
     '#title' => t('Width'),
-    '#default_value' => $node->width,
+    '#default_value' => empty($node->width) ? 0 : $node->width,
     '#size' => 10,
   );
   $form['base']['dimensions']['height'] = array('#type' => 'textfield',
     '#title' => t('Height'),
-    '#default_value' => $node->height,
+    '#default_value' => empty($node->height) ? 0 : $node->height,
     '#size' => 10,
   );
   $form['base']['pkg_qty'] = array('#type' => 'textfield',
     '#title' => t('Package quantity'),
-    '#default_value' => $node->pkg_qty ? $node->pkg_qty : 1,
+    '#default_value' => empty($node->pkg_qty) ? 1 : $node->pkg_qty,
     '#description' => t('For a package containing only this product, how many are in it?'),
     '#weight' => 25,
   );
   $form['base']['default_qty'] = array('#type' => 'textfield',
     '#title' => t('Default quantity to add to cart'),
-    '#default_value' => !is_null($node->default_qty) ? $node->default_qty : 1,
+    '#default_value' => empty($node->default_qty) ? 1 : $node->default_qty,
     '#description' => t('Leave blank or zero to disable the quantity field in the add to cart form.'),
     '#weight' => 27,
     '#size' => 5,
@@ -577,7 +578,7 @@ function uc_product_form(&$node) {
     '#title' => t('List position'),
     '#description' => t("Specify a value to set this product's position in product lists.<br />Products in the same position will be sorted alphabetically."),
     '#delta' => 25,
-    '#default_value' => isset($node->ordering) ? $node->ordering : 0,
+    '#default_value' => empty($node->ordering) ? 0 : $node->ordering,
     '#weight' => 30,
   );
 
@@ -1294,7 +1295,7 @@ function uc_product_administration() {
   );
 
   // Display the product table and pager if necessary.
-  $output .= tapir_get_table('uc_product_table', $args) . theme('pager');
+  $output = tapir_get_table('uc_product_table', $args) . theme('pager');
 
   return $output;
 }
@@ -1651,11 +1652,15 @@ function uc_product_class_default() {
  * @see uc_product_class_form_submit
  */
 function uc_product_class_form($form_state, $class = null) {
-  if ($class) {
-    drupal_set_title(check_plain($class->name));
+  if (!empty($class)) {
+    $classname = $class->name;
+    $classdesc = $class->description;
+    drupal_set_title(check_plain($classname));
     $form['pcid'] = array('#type' => 'hidden', '#value' => $class->pcid);
   }
   else {
+    $classname = '';
+    $classdesc = '';
     $form['pcid'] = array('#type' => 'textfield',
       '#title' => t('Class ID'),
       '#required' => true,
@@ -1666,14 +1671,14 @@ function uc_product_class_form($form_sta
   $form['name'] = array(
     '#type' => 'textfield',
     '#title' => t('Class name'),
-    '#default_value' => $class->name,
+    '#default_value' => $classname,
     '#required' => true,
   );
   $form['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
     '#description' => t('This text describes the content type created for this product class to administrators.'),
-    '#default_value' => $class->description,
+    '#default_value' => $classdesc,
   );
   $form['submit'] = array(
     '#type' => 'submit',
Index: uc_store/uc_store.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_store/uc_store.module,v
retrieving revision 1.14.2.3
diff -u -p -r1.14.2.3 uc_store.module
--- uc_store/uc_store.module	14 Aug 2008 21:08:48 -0000	1.14.2.3
+++ uc_store/uc_store.module	7 Jan 2009 22:11:46 -0000
@@ -1785,6 +1785,8 @@ function uc_currency_format($value, $sig
   if ($value < 0) {
     $value = abs($value);
     $format = '-';
+  } else {
+    $format = '';
   }
 
   if ($sign && !variable_get('uc_sign_after_amount', FALSE)) {
