[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8879]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8879] |
Date: |
Wed, 15 Feb 2012 09:30:38 +0000 |
Revision: 8879
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8879
Author: vator
Date: 2012-02-15 09:30:38 +0000 (Wed, 15 Feb 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2012-02-15 09:23:32 UTC
(rev 8878)
+++ trunk/controller/inc/class.uicalendar.inc.php 2012-02-15 09:30:38 UTC
(rev 8879)
@@ -108,7 +108,7 @@
$location_code =
$my_locations[0]["location_code"];
}
- $num_days_in_month = cal_days_in_month(CAL_GREGORIAN,
$month, $year);
+ $num_days_in_month = cal_days_in_month(CAL_GREGORIAN,
$month, $year);
// Fetches controls for location within specified time
period
$controls_for_location_array =
$this->so_control->get_controls_by_location($location_code, $from_date_ts,
$to_date_ts);
@@ -216,43 +216,39 @@
$controls_calendar_array = array();
- // Puts aggregate values for daily controls in a twelve
month array
- foreach($controls_for_location_array as $control){
-
+ // Puts aggregate values for daily controls in a twelve
month array
+ foreach($controls_for_location_array as $control)
+ {
if($control->get_repeat_type() == 0 |
$control->get_repeat_type() == 1)
{
$controls_calendar_array =
$this->calendar_builder->build_agg_calendar_array($controls_calendar_array,
$control, $location_code, $year);
}
- else if($control->get_repeat_type() == 2)
- {
- $repeat_type = 2;
- $control_check_list_array =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
- //print_r($control_check_list_array);
-
- $controls_calendar_array =
$this->calendar_builder->build_calendar_array( $controls_calendar_array,
$control_check_list_array, 12, "view_months" );
- }
- else if($control->get_repeat_type() == 3)
- {
- $repeat_type = 3;
- $control_check_list_array =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
-
- $controls_calendar_array =
$this->calendar_builder->build_calendar_array( $controls_calendar_array,
$control_check_list_array, 12, "view_months" );
- }
}
- /*
$repeat_type = 2;
- $control_check_list_array =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
- print_r($controls_calendar_array);
- print_r($controls_calendar_array);
-
- $controls_calendar_array =
$this->calendar_builder->build_calendar_array( $controls_calendar_array,
$control_check_list_array, 12, "view_months" );
-
+ $control_check_list_array_for_month =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
+
$repeat_type = 3;
- $control_check_list_array =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
+ $control_check_list_array_for_year =
$this->so->get_check_lists_for_location( $location_code, $from_date_ts,
$to_date_ts, $repeat_type );
+ $control_check_list_array =
array_merge($control_check_list_array_for_month,
$control_check_list_array_for_year);
+
+ $in_array = 0;
+ foreach($controls_for_location_array as $control_loc){
+ foreach($control_check_list_array as
$control_check_list){
+ if($control_loc->get_id() ==
$control_check_list->get_id()){
+ $in_array = 1;
+ }
+ }
+
+ if($in_array == 0 &
$control_loc->get_repeat_type() != 0 & $control_loc->get_repeat_type() != 1 ){
+ $control_check_list_array[] =
$control_loc;
+ }
+ }
+
$controls_calendar_array =
$this->calendar_builder->build_calendar_array( $controls_calendar_array,
$control_check_list_array, 12, "view_months" );
- */
+
+
foreach($controls_calendar_array as &$inst)
{
$curr_control = &$inst['control'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8879],
Torstein <=