fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13691] controller: added missing functions


From: Sigurd Nes
Subject: [Fmsystem-commits] [13691] controller: added missing functions
Date: Mon, 03 Aug 2015 10:53:03 +0000

Revision: 13691
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13691
Author:   sigurdne
Date:     2015-08-03 10:53:03 +0000 (Mon, 03 Aug 2015)
Log Message:
-----------
controller: added missing functions

Modified Paths:
--------------
    trunk/controller/inc/class.uicomponent.inc.php

Modified: trunk/controller/inc/class.uicomponent.inc.php
===================================================================
--- trunk/controller/inc/class.uicomponent.inc.php      2015-08-03 09:35:52 UTC 
(rev 13690)
+++ trunk/controller/inc/class.uicomponent.inc.php      2015-08-03 10:53:03 UTC 
(rev 13691)
@@ -610,6 +610,7 @@
                                        // LOCATIONS: Process aggregated values 
for controls with repeat type day or week
                                        if($repeat_type <= 
controller_control::REPEAT_TYPE_WEEK)
                                        {
+                                               //FIX ME: Not currently 
supported
 
                                                // COMPONENTS: Process 
aggregated values for controls with repeat type day or week
                                                
foreach($components_for_control_array as $component)
@@ -1056,4 +1057,35 @@
 
                        return 
"{$repeat_type}<br/>{$link}<br/>{$assigned_to}<br/>{$time}";
                }
+
+               function get_start_month_for_control($control)
+               {
+                       // Checks if control starts in the year that is 
displayed
+                       if(date("Y", $control->get_start_date()) == $year)
+                       {
+                               $from_month = date("n", 
$control->get_start_date());
+                       }
+                       else
+                       {
+                               $from_month = 1;
+                       }
+
+                       return $from_month;
+               }
+
+               function get_end_month_for_control($control)
+               {
+                       // Checks if control ends in the year that is displayed
+                       if(date("Y", $control->get_end_date()) == $year)
+                       {
+                               $to_month = date("n", $control->get_end_date());
+                       }
+                       else
+                       {
+                               $to_month = 12;
+                       }
+
+                       return $to_month;
+               }
+
        }
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]