=== modified file 'uc_order/uc_order.module'
--- uc_order/uc_order.module	2009-05-07 20:12:13 +0000
+++ uc_order/uc_order.module	2009-06-23 13:24:18 +0000
@@ -27,22 +27,22 @@
   $items = array();
 
   $items['admin/store/settings/orders'] = array(
-    'title' => 'Order settings',
-    'description' => 'Configure the order settings.',
+    'title' => t('Order settings'),
+    'description' => t('Configure the order settings.'),
     'page callback' => 'uc_order_settings_overview',
     'access arguments' => array('administer store'),
     'type' => MENU_NORMAL_ITEM,
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/settings/orders/overview'] = array(
-    'title' => 'Overview',
-    'description' => 'View the order settings.',
+    'title' => t('Overview'),
+    'description' => t('View the order settings.'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -10,
   );
   $items['admin/store/settings/orders/edit'] = array(
-    'title' => 'Edit',
-    'description' => 'Edit the order settings.',
+    'title' => t('Edit'),
+    'description' => t('Edit the order settings.'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_settings_form'),
     'access arguments' => array('administer store'),
@@ -51,14 +51,14 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/settings/orders/edit/basic'] = array(
-    'title' => 'Order settings',
-    'description' => 'Edit the basic order settings.',
+    'title' => t('Order settings'),
+    'description' => t('Edit the basic order settings.'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -10,
   );
   $items['admin/store/settings/orders/edit/workflow'] = array(
-    'title' => 'Order workflow',
-    'description' => 'Modify and configure order states and statuses.',
+    'title' => t('Order workflow'),
+    'description' => t('Modify and configure order states and statuses.'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_workflow_form'),
     'access arguments' => array('administer order workflow'),
@@ -67,8 +67,8 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/settings/orders/edit/panes'] = array(
-    'title' => 'Order panes',
-    'description' => 'Edit the pane settings for order pages.',
+    'title' => t('Order panes'),
+    'description' => t('Edit the pane settings for order pages.'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_panes_form'),
     'access arguments' => array('administer store'),
@@ -78,8 +78,8 @@
   );
 
   $items['admin/store/settings/orders/edit/workflow/create'] = array(
-    'title' => 'Create an order status',
-    'description' => 'Create a custom order status for your store.',
+    'title' => t('Create an order status'),
+    'description' => t('Create a custom order status for your store.'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_status_create_form'),
     'access arguments' => array('administer order workflow'),
@@ -88,8 +88,8 @@
   );
 
   $items['admin/store/orders'] = array(
-    'title' => 'Orders',
-    'description' => 'View and process orders.',
+    'title' => t('Orders'),
+    'description' => t('View and process orders.'),
     'page callback' => 'uc_order_admin',
     'page arguments' => array(NULL, NULL, FALSE),
     'access arguments' => array('view all orders'),
@@ -98,8 +98,8 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/view'] = array(
-    'title' => 'View orders',
-    'description' => 'View and process the orders received through your website.',
+    'title' => t('View orders'),
+    'description' => t('View and process the orders received through your website.'),
     'page arguments' => array(NULL, NULL, FALSE),
     'access arguments' => array('view all orders'),
     'type' => MENU_NORMAL_ITEM,
@@ -107,16 +107,16 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/sort/%'] = array(
-    'title' => 'Orders',
-    'description' => 'View orders with a particular order status.',
+    'title' => t('Orders'),
+    'description' => t('View orders with a particular order status.'),
     'page arguments' => array(NULL, NULL, FALSE),
     'access arguments' => array('view all orders'),
     'type' => MENU_CALLBACK,
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/create'] = array(
-    'title' => 'Create order',
-    'description' => 'Create an empty new order.',
+    'title' => t('Create order'),
+    'description' => t('Create an empty new order.'),
     'page callback' => 'uc_order_create',
     'access arguments' => array('create orders'),
     'type' => MENU_NORMAL_ITEM,
@@ -124,8 +124,8 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/create/%user'] = array(
-    'title' => 'Create order',
-    'description' => 'Create an order for a customer.',
+    'title' => t('Create order'),
+    'description' => t('Create an order for a customer.'),
     'page callback' => 'uc_order_create',
     'page arguments' => array(4),
     'access arguments' => array('create orders'),
@@ -134,8 +134,8 @@
   );
 
   $items['admin/store/orders/search'] = array(
-    'title' => 'Search orders',
-    'description' => 'Search existing orders.',
+    'title' => t('Search orders'),
+    'description' => t('Search existing orders.'),
     'page callback' => 'uc_order_usearch',
     'access arguments' => array('view all orders'),
     'type' => MENU_NORMAL_ITEM,
@@ -143,14 +143,14 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/address_book'] = array(
-    'title' => 'Select address',
+    'title' => t('Select address'),
     'page callback' => 'uc_order_address_book',
     'access arguments' => array('edit orders'),
     'type' => MENU_CALLBACK,
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/customer'] = array(
-    'title' => 'Select customer',
+    'title' => t('Select customer'),
     'page callback' => 'uc_order_select_customer',
     'page arguments' => array(NULL),
     'access arguments' => array('edit orders'),
@@ -158,8 +158,8 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['user/%user/orders'] = array(
-    'title' => 'Orders',
-    'description' => 'View your order history.',
+    'title' => t('Orders'),
+    'description' => t('View your order history.'),
     'page callback' => 'uc_order_history',
     'page arguments' => array(1),
     'access callback' => 'uc_order_can_view_order',
@@ -170,7 +170,7 @@
   $items['user/%user/order/%uc_order'] = array(
     'title callback' => 'uc_order_page_title',
     'title arguments' => array(3),
-    'description' => 'View order.',
+    'description' => t('View order.'),
     'page callback' => 'uc_order_view',
     'page arguments' => array(3, 'customer'),
     'access callback' => 'uc_order_can_view_order',
@@ -179,8 +179,8 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['user/%user/order/%uc_order/invoice'] = array(
-    'title' => 'View invoice',
-    'description' => 'View order invoice.',
+    'title' => t('View invoice'),
+    'description' => t('View order invoice.'),
     'page callback' => 'uc_order_view',
     'page arguments' => array(3, 'invoice'),
     'access callback' => 'uc_order_can_view_order',
@@ -192,7 +192,7 @@
   $items['admin/store/orders/%uc_order'] = array(
     'title callback' => 'uc_order_page_title',
     'title arguments' => array(3),
-    'description' => 'View order',
+    'description' => t('View order'),
     'page callback' => 'uc_order_view',
     'page arguments' => array(3, 'view'),
     'access arguments' => array('view all orders'),
@@ -205,7 +205,7 @@
     'weight' => -10
   );
   $items['admin/store/orders/%uc_order/edit'] = array(
-    'title' => 'Edit',
+    'title' => t('Edit'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_edit_form', 3),
     'access arguments' => array('edit orders'),
@@ -214,7 +214,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/add_line_item/%'] = array(
-    'title' => 'Add a line item',
+    'title' => t('Add a line item'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_add_line_item_form', 3, 5),
     'access arguments' => array('edit orders'),
@@ -222,7 +222,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/products'] = array(
-    'title' => 'Products',
+    'title' => t('Products'),
     'page callback' => 'uc_order_edit_products',
     'page arguments' => array(3),
     'access arguments' => array('edit orders'),
@@ -230,7 +230,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/product_select'] = array(
-    'title' => 'Product select',
+    'title' => t('Product select'),
     'page callback' => 'uc_order_load_product_select',
     'page arguments' => array(3),
     'access arguments' => array('edit orders'),
@@ -238,7 +238,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/add_product/%node'] = array(
-    'title' => 'Add product',
+    'title' => t('Add product'),
     'page callback' => 'uc_order_add_product',
     'page arguments' => array(3, 5),
     'access arguments' => array('edit orders'),
@@ -246,7 +246,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/invoice'] = array(
-    'title' => 'Invoice',
+    'title' => t('Invoice'),
     'page callback' => 'uc_order_invoice',
     'page arguments' => array(3),
     'access arguments' => array('view all orders'),
@@ -255,12 +255,12 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/invoice/view'] = array(
-    'title' => 'View invoice',
+    'title' => t('View invoice'),
     'type' => MENU_DEFAULT_LOCAL_TASK,
     'weight' => -10,
   );
   $items['admin/store/orders/%uc_order/invoice/print'] = array(
-    'title' => 'Printable invoice',
+    'title' => t('Printable invoice'),
     'page arguments' => array(3, 'print'),
     'access arguments' => array('view all orders'),
     'type' => MENU_LOCAL_TASK,
@@ -268,7 +268,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/invoice/mail'] = array(
-    'title' => 'Mail invoice',
+    'title' => t('Mail invoice'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_mail_invoice_form', 3),
     'access arguments' => array('view all orders'),
@@ -277,7 +277,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/log'] = array(
-    'title' => 'Log',
+    'title' => t('Log'),
     'page callback' => 'uc_order_log',
     'page arguments' => array(3),
     'access callback' => 'uc_order_access_order_log',
@@ -286,7 +286,7 @@
     'file' => 'uc_order.admin.inc',
   );
   $items['admin/store/orders/%uc_order/delete'] = array(
-    'title' => 'Delete an order',
+    'title' => t('Delete an order'),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('uc_order_delete_confirm_form', 3),
     'access callback' => 'uc_order_can_delete',
@@ -347,6 +347,8 @@
  */
 function uc_order_token_values($type, $object = NULL) {
   $values = array();
+  //EALL FIX
+  $ship_method = "";
   switch ($type) {
     case 'order':
       $order = $object;
@@ -1165,6 +1167,10 @@
  * Return an array of comments or admin comments for an order.
  */
 function uc_order_comments_load($order_id, $admin = FALSE) {
+  //EALL FIX Undefined variable: comments
+  $comments = array();
+  //EAKK FIX notice: Undefined variable: join
+  $join = "";
   if (!$admin) {
     $join = " LEFT JOIN {uc_order_statuses} AS os ON oc.order_status = os.order_status_id";
   }
@@ -1232,14 +1238,16 @@
           && (!isset($type['display_only']) || $type['display_only'] == FALSE)) {
         $result = $type['callback']('load', $order);
         if ($result !== FALSE && is_array($result)) {
+          //FIX FOR EALL: Variable Testing: Set to null because I am not sure
+          //what the original author had intent for.
           foreach ($result as $line) {
             $items[] = array(
-              'line_item_id' => $line['id'],
-              'type' => $type['id'],
-              'title' => $line['title'],
-              'amount' => $line['amount'],
+              'line_item_id' => isset($line['id']) ? $line['id'] :  null ,
+              'type' => isset($type['id']) ? $type['id'] :  null ,
+              'title' => isset($line['title']) ? $line['title'] :  null ,
+              'amount' => isset($line['amount']) ? $line['amount'] :  null ,
               'weight' => isset($line['weight']) ? $line['weight'] : $type['weight'],
-              'data' => $line['data'],
+              'data' => isset($line['data']) ? $line['data'] :  null ,
             );
           }
         }
@@ -1274,7 +1282,7 @@
     // Return false if any module says the update is not good to go.
     $return = module_invoke_all('order', 'can_update', $order, $status);
     for ($i = 0; $i < count($return); $i++) {
-      if ($return[$i] === FALSE) {
+      if (isset($return[$i]) && $return[$i] === FALSE) {
         return FALSE;
       }
     }
@@ -1688,8 +1696,11 @@
       $statuses[$status['id']] = $status;
     }
   }
-
-  return $statuses[$status_id][$key];
+  //EALL Fix
+  if(!empty($statuses[$status_id][$key])) {
+    return $statuses[$status_id][$key];
+  }
+  return null;
 }
 
 /**
@@ -1702,9 +1713,16 @@
  *   Valid actions for an order; returned according to the $icon_html parameter.
  */
 function uc_order_actions($order, $icon_html = FALSE) {
-  $state = uc_order_status_data($order->order_status, 'state');
-  $order_id = array('@order_id' => $order->order_id);
-
+ 
+  //Fix for notice: Trying to get property of non-object this function does not
+  //have a standardized return for fail, I choose null.
+ if(!isset($order->order_id) || !is_object($order) || !is_object($order->order_status)) {
+    return null;
+  } 
+   //Fix For notice: Undefined variable: output
+    $order = "";
+    $state = uc_order_status_data($order->order_status, 'state');
+    $order_id = array('@order_id' => $order->order_id);
   if (user_access('view all orders')) {
     $alt = t('View order @order_id.', $order_id);
     $actions[] = array(

