Revision: 2721
https://sourceforge.net/p/mrbs/code/2721/
Author: cimorrison
Date: 2013-03-12 16:36:31 +0000 (Tue, 12 Mar 2013)
Log Message:
-----------
Made Export Series work with monthly repeats (it got broken when the new
monthly repeat types were introduced)
Modified Paths:
--------------
mrbs/trunk/web/functions_ical.inc
mrbs/trunk/web/mrbs_sql.inc
mrbs/trunk/web/view_entry.php
Modified: mrbs/trunk/web/functions_ical.inc
===================================================================
--- mrbs/trunk/web/functions_ical.inc 2013-03-12 14:32:45 UTC (rev 2720)
+++ mrbs/trunk/web/functions_ical.inc 2013-03-12 16:36:31 UTC (rev 2721)
@@ -1145,7 +1145,7 @@
// (We use PHP_INT_MAX rather than $max_rep_entrys because
$max_rep_entrys may
// have changed since the series was created.)
$rep_details = array();
- foreach (array('rep_type', 'rep_opt', 'rep_num_weeks',
'month_absolute') as $key)
+ foreach (array('rep_type', 'rep_opt', 'rep_num_weeks',
'month_absolute', 'month_relative') as $key)
{
if (isset($start_row[$key]))
{
Modified: mrbs/trunk/web/mrbs_sql.inc
===================================================================
--- mrbs/trunk/web/mrbs_sql.inc 2013-03-12 14:32:45 UTC (rev 2720)
+++ mrbs/trunk/web/mrbs_sql.inc 2013-03-12 16:36:31 UTC (rev 2721)
@@ -708,7 +708,7 @@
$month++;
}
}
- else
+ elseif (isset($rep_details['month_relative']))
{
$day = byday_to_day($year, $month, $rep_details['month_relative']);
while (($day === FALSE) || (($day < $start_dom) && ($month ==
$start_month)))
@@ -717,6 +717,10 @@
$day = byday_to_day($year, $month, $rep_details['month_relative']);
}
}
+ else
+ {
+ trigger_error("No monthly repeat type, E_USER_WARNING");
+ }
trimToEndOfMonth($month, $day, $year);
break;
default:
Modified: mrbs/trunk/web/view_entry.php
===================================================================
--- mrbs/trunk/web/view_entry.php 2013-03-12 14:32:45 UTC (rev 2720)
+++ mrbs/trunk/web/view_entry.php 2013-03-12 16:36:31 UTC (rev 2721)
@@ -206,7 +206,7 @@
if ($series)
{
// If it's a series we want the repeat information
- $sql .= ", T.rep_type, T.end_date, T.rep_opt, T.rep_num_weeks";
+ $sql .= ", T.rep_type, T.end_date, T.rep_opt, T.rep_num_weeks,
T.month_absolute, T.month_relative";
}
$sql .= " FROM $tbl_area A, $tbl_room R, $tbl_entry E";
if ($series)
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits