Revision: 1425
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1425&view=rev
Author:   cimorrison
Date:     2010-08-27 11:46:07 +0000 (Fri, 27 Aug 2010)

Log Message:
-----------
Fixed bug which occurred in email notifications when the browser language was 
different to the email language: email notifications would show a change to the 
duration simply because the new and previous durations were in different 
languages.

Modified Paths:
--------------
    mrbs/trunk/web/functions_mail.inc

Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc   2010-08-26 15:47:18 UTC (rev 1424)
+++ mrbs/trunk/web/functions_mail.inc   2010-08-27 11:46:07 UTC (rev 1425)
@@ -930,8 +930,10 @@
       $mail_previous['duration'] = $row['tbl_r_duration'] -
         cross_dst($row['tbl_r_start_time'], $row['tbl_r_end_time']);    
     }
+    // Don't translate the units at this stage, as they'll get translated into 
the
+    // browser language rather than the mail language.   We'll translate them 
later.
     toPeriodString($mail_previous['start_period'],
-                   $mail_previous['duration'], $mail_previous['dur_units']);
+                   $mail_previous['duration'], $mail_previous['dur_units'], 
FALSE);
   }
   // If we don't use periods
   else
@@ -960,8 +962,12 @@
       $mail_previous['duration'] = $row['tbl_r_duration'] -
         cross_dst($row['tbl_r_start_time'], $row['tbl_r_end_time']);
     }
-    toTimeString($mail_previous['duration'], $mail_previous['dur_units']);
+    // Don't translate the units at this stage, as they'll get translated into 
the
+    // browser language rather than the mail language.   We'll translate them 
later.
+    toTimeString($mail_previous['duration'], $mail_previous['dur_units'], 
FALSE);
   }
+  // Now translate the duration units into the mail language
+  $mail_previous['dur_units'] = get_mail_vocab($mail_previous['dur_units']);
   
   
   // Next, get the repeat information if it's a series (and if it's not


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to