Revision: 1454
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1454&view=rev
Author:   cimorrison
Date:     2010-09-15 15:39:32 +0000 (Wed, 15 Sep 2010)

Log Message:
-----------
Tidied up the code by having a consistent use of the array index 'end_date'.   
No functionality change.

Modified Paths:
--------------
    mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php
    mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
    mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
    mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
    mrbs/branches/provisional_bookings_new_style/web/view_entry.php

Modified: 
mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php  
2010-09-15 15:17:08 UTC (rev 1453)
+++ mrbs/branches/provisional_bookings_new_style/web/approve_entry_handler.php  
2010-09-15 15:39:32 UTC (rev 1454)
@@ -89,7 +89,6 @@
     
     // Process some special fields
     $data['duration'] = ($data['end_time'] - $data['start_time']) - 
cross_dst($data['start_time'], $data['end_time']);
-    $data['end_date'] = isset($data['rep_enddate'])   ? $data['rep_enddate']   
: NULL;
     
     if ($enable_periods)
     {

Modified: 
mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php     
2010-09-15 15:17:08 UTC (rev 1453)
+++ mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php     
2010-09-15 15:39:32 UTC (rev 1454)
@@ -336,13 +336,13 @@
     isset($rep_end_month) && isset($rep_end_day) && isset($rep_end_year))
 {
   // Get the repeat entry settings
-  $rep_enddate = mktime($hour, $minute, 0,
-                        $rep_end_month, $rep_end_day, $rep_end_year);
+  $end_date = mktime($hour, $minute, 0,
+                     $rep_end_month, $rep_end_day, $rep_end_year);
 }
 else
 {
   $rep_type = REP_NONE;
-  $rep_enddate = 0;  // to avoid an undefined variable notice
+  $end_date = 0;  // to avoid an undefined variable notice
 }
 
 if (!isset($rep_day))
@@ -376,7 +376,7 @@
 if ($rep_type != REP_NONE)
 {
   $reps = mrbsGetRepeatEntryList($starttime,
-                                 isset($rep_enddate) ? $rep_enddate : 0,
+                                 isset($end_date) ? $end_date : 0,
                                  $rep_type, $rep_opt, $max_rep_entrys,
                                  $rep_num_weeks);
 }
@@ -517,7 +517,7 @@
     if ($edit_type == "series")
     {
       $data['rep_type'] = $rep_type;
-      $data['end_date'] = $rep_enddate;
+      $data['end_date'] = $end_date;
       $data['rep_opt'] = $rep_opt;
       $data['rep_num_weeks'] = (isset($rep_num_weeks)) ? $rep_num_weeks : 0;
     }

Modified: mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc 
2010-09-15 15:17:08 UTC (rev 1453)
+++ mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc 
2010-09-15 15:39:32 UTC (rev 1454)
@@ -620,7 +620,7 @@
         $temp = mail_strftime('%A %d %B %Y',$data['end_date']);
         $body .=  ": " . 
           compareEntries($temp,
-                         $mail_previous['rep_end_date'],
+                         $mail_previous['end_date'],
                          $new_entry) . "\n";
       }
     }
@@ -802,7 +802,7 @@
     }
 
     $body .= "\n" . get_mail_vocab("rep_end_date");
-    $body .=  ": " . $mail_previous['rep_end_date'] . "\n";
+    $body .=  ": " . $mail_previous['end_date'] . "\n";
   }
   $body .= "\n";
   // End of mail details
@@ -865,7 +865,7 @@
   { 
     // get the repeat end date
     // use getMailTimeDateString as all I want is the date
-    $data['rep_end_date'] = getMailTimeDateString($data['rep_enddate'], FALSE);
+    $data['end_date'] = getMailTimeDateString($data['end_date'], FALSE);
     
     // get the names of the repeat days 
     switch($data['rep_type'])

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc       
2010-09-15 15:17:08 UTC (rev 1453)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc       
2010-09-15 15:39:32 UTC (rev 1454)
@@ -560,18 +560,7 @@
  * 
  * Creates a repeat entry in the data base + all the repeating entrys
  * 
- * $starttime   - Start time of entry
- * $endtime     - End time of entry
- * $rep_type    - The repeat type
- * $rep_enddate - When the repeating ends
- * $rep_opt     - Any options associated with the entry
- * $room_id     - Room ID
- * $owner       - Owner
- * $name        - Name
- * $type        - Type (Internal/External)
- * $description - Description
- * $status      - Status code
- * $custom_fields - an array of any custom fields
+ * $data      - An array containing the entry details
  * 
  * Returns:
  *   an array
@@ -895,10 +884,10 @@
           fatal_error(TRUE, get_vocab("invalid_series_id"));
         }
       }
-      $row['rep_type']      = $extra_row['rep_type'];
-      $row['rep_enddate']   = $extra_row['end_date'];
-      $row['rep_opt']       = $extra_row['rep_opt'];
-      $row['rep_num_weeks'] = $extra_row['rep_num_weeks'];
+      $row['rep_type']         = $extra_row['rep_type'];
+      $row['end_date']         = $extra_row['end_date'];
+      $row['rep_opt']          = $extra_row['rep_opt'];
+      $row['rep_num_weeks']    = $extra_row['rep_num_weeks'];
       $row['repeat_info_time'] = $extra_row['repeat_info_time'];
       $row['repeat_info_user'] = $extra_row['repeat_info_user'];
       $row['repeat_info_text'] = $extra_row['repeat_info_text'];

Modified: mrbs/branches/provisional_bookings_new_style/web/view_entry.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/view_entry.php     
2010-09-15 15:17:08 UTC (rev 1453)
+++ mrbs/branches/provisional_bookings_new_style/web/view_entry.php     
2010-09-15 15:39:32 UTC (rev 1454)
@@ -170,7 +170,7 @@
     case 'repeat_id':
     case 'reminded':
     case 'rep_type':
-    case 'rep_enddate':
+    case 'end_date':
     case 'rep_opt':
     case 'rep_num_weeks':
     case 'start_time':


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

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to