? bad_performance.patch
? bad_performance.patcj
Index: uc_discounts.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_discounts/uc_discounts.module,v
retrieving revision 1.4
diff -u -p -r1.4 uc_discounts.module
--- uc_discounts.module	21 Oct 2008 16:59:21 -0000	1.4
+++ uc_discounts.module	22 Jan 2009 12:53:59 -0000
@@ -11,8 +11,8 @@
 /**
  * Yes/No constants. Allows to easily change the case later.
  */
-define('UC_DISCOUNTS_YES', t('yes'));
-define('UC_DISCOUNTS_NO', t('no'));
+define('UC_DISCOUNTS_YES', 'yes');
+define('UC_DISCOUNTS_NO', 'no');
 
 /*******************************************************************************
  * Hook Functions (Drupal)
@@ -739,10 +739,10 @@ function uc_discounts_table() {
   foreach ($discount_list as $discount) {
     $rows[] = array(
       l($discount->name, 'admin/store/discounts/'. $discount->id),
-      $discount->is_active ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
+      $discount->is_active ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO),
       $discount->weight,
-      $discount->do_end_processing ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
-      $discount->is_exclusive ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
+      $discount->do_end_processing ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO),
+      $discount->is_exclusive ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO)),
       format_date($discount->start_time),
       format_date($discount->end_time),
       //l(t('View'), 'admin/store/discounts/'.$discount->id),
@@ -778,11 +778,11 @@ function uc_discounts_discount_info($dis
     ),
     array(
       'label' => 'End Processing',
-      'value' => $discount->do_end_processing ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
+      'value' => $discount->do_end_processing ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO),
     ),
     array(
       'label' => 'Exclusive',
-      'value' => $discount->is_exclusive ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
+      'value' => $discount->is_exclusive ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO),
     ),
     array(
       'label' => 'Weight',
@@ -798,7 +798,7 @@ function uc_discounts_discount_info($dis
     ),
     array(
       'label' => 'Active',
-      'value' => $discount->is_active ? UC_DISCOUNTS_YES : UC_DISCOUNTS_NO,
+      'value' => $discount->is_active ? t(UC_DISCOUNTS_YES) : t(UC_DISCOUNTS_NO),
     ),
   );
 
