Revision: 2499
          https://sourceforge.net/p/mrbs/code/2499/
Author:   cimorrison
Date:     2012-10-15 15:04:04 +0000 (Mon, 15 Oct 2012)
Log Message:
-----------
Made edit_entry recognise existing monthly bookings

Modified Paths:
--------------
    mrbs/branches/improved_repeat_interface/web/edit_entry.php

Modified: mrbs/branches/improved_repeat_interface/web/edit_entry.php
===================================================================
--- mrbs/branches/improved_repeat_interface/web/edit_entry.php  2012-10-15 
07:47:37 UTC (rev 2498)
+++ mrbs/branches/improved_repeat_interface/web/edit_entry.php  2012-10-15 
15:04:04 UTC (rev 2499)
@@ -905,7 +905,7 @@
   if(($entry_type == ENTRY_RPT_ORIGINAL) || ($entry_type == ENTRY_RPT_CHANGED))
   {
     $sql = "SELECT rep_type, start_time, end_time, end_date, rep_opt, 
rep_num_weeks,
-                   month_absolute
+                   month_absolute, month_relative
               FROM $tbl_repeat 
              WHERE id=$rep_id
              LIMIT 1";
@@ -1063,10 +1063,17 @@
   $rep_day       = array(date('w', $start_time));
   $rep_num_weeks = 1;
   $month_type = REP_MONTH_ABSOLUTE;
-  $month_absolute = date('j', $start_time);
+}
+
+if (!isset($month_relative))
+{
   $month_relative = date_byday($start_time);
-  list($month_relative_ord, $month_relative_day) = 
byday_split($month_relative);
 }
+if (!isset($month_absolute))
+{
+  $month_absolute = date('j', $start_time);
+}
+list($month_relative_ord, $month_relative_day) = byday_split($month_relative);
 
 $start_hour  = strftime('%H', $start_time);
 $start_min   = strftime('%M', $start_time);
@@ -1355,6 +1362,7 @@
       echo "<fieldset class= \"rep_type_details js_none\" 
id=\"rep_monthly\">\n";
       echo "<legend></legend>\n";
       
+      // MONTH ABSOLUTE (eg Day 15 of every month)
       echo "<fieldset>\n";
       echo "<legend></legend>\n";
       $params = array('name'     => 'month_type',
@@ -1372,6 +1380,7 @@
       generate_input($params);
       echo "</fieldset>\n";
       
+      // MONTH RELATIVE (eg the second Thursday of every month)
       echo "<fieldset>\n";
       echo "<legend></legend>\n";
       $params = array('name'     => 'month_type',
@@ -1380,6 +1389,9 @@
                       'disabled' => $disabled);
       generate_radio($params);
       
+      // Note: the select box order does not internvery 
month)p_monthly\">\n";,(rev 
2499)���`$+r�`$+�q���r���u��`$+���`$+�a$+��b$+r�����#b$+g����e���k��`$+6
 
��!�!�q���r���xdb$+h������`$+���`$+�q���`��`$+�q����_eb$+u��`$+Peb$+�Teb$+�Yeb$+���`$+xdb$+h����f���k��`$+�!�!�q���r���H.�a$+�h������`$+���`$+�q���`��`$+�q����q����q���8�a$+�p�r���u��`$+���`$+�h����g���k��`$+GHIJKMNOP�q���r���H��a$+�j������`$+���`$+�q���0_eb$+u��`$+pb$+��a$+Peb$+�Teb$+�Yeb$+���`$+H��a$+�j����h���k��`$+8��a$+�j����h���k��`$+(��a$+�j���
 i���k��`$+��a$+�j���Pi���k��`$+ 
�^eb$+u��`$+�Yeb$+�c����h�a$+e��`$+�Teb$+�i���yh�a$+e��`$+Peb$+
 
j���Zh�a$+e��`$+��a$+pb$+��a$+Peb$+�tb$+�Teb$+�Yeb$+���`$+8�a$+�`a$+r���p��a$+�k����j���k��`$+5678:<=>?@BD�q���r�����]a$+r���u��`$+�a$+Pj����`a$+e��`$+�a$+�_@f�S
 
Q��l����,a$+r�����]a$+�l����k���k��`$+u]��
     
4Q��U^Qʉ��u������*ēv�q���r���H.*a$+tfa$+Ps������b$+���b$+��ca$+�q���s����q���0n���b$+u��`$+�tb$+�t������b$+`s����n��������������b$+r���ationalise
 very well and could
+      // do with revisiting.   It assumes all languages have the same order as 
English
+      // eg "the second Wednesday" which is probavly not true.
       $options = array();
       foreach (array('1', '2', '3', '4', '-1', '-2', '-3', '-4') as $i)
       {
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to