fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9139]


From: Torstein
Subject: [Fmsystem-commits] [9139]
Date: Fri, 13 Apr 2012 07:54:55 +0000

Revision: 9139
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9139
Author:   vator
Date:     2012-04-13 07:54:54 +0000 (Fri, 13 Apr 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.uicontrol.inc.php
    trunk/controller/inc/helper/class.check_list_status_manager.inc.php
    trunk/controller/inc/model/class.check_list.inc.php

Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php        2012-04-13 07:20:40 UTC 
(rev 9138)
+++ trunk/controller/inc/class.uicontrol.inc.php        2012-04-13 07:54:54 UTC 
(rev 9139)
@@ -595,13 +595,15 @@
                        $control_id = phpgw::get_var('control_id');
                        $control = $this->so->get_single($control_id);
                        
+                       // Fetches saved control groups from DB for this 
control 
                        $saved_control_groups = 
$this->so_control_group_list->get_control_groups_by_control($control_id);
                
                        $saved_groups_with_items_array = array();
                        
-                       //Populating array with saved control items for each 
group
+                       // Populating array with saved control items for each 
group
                        foreach ($saved_control_groups as $control_group)
                        {       
+                               // Fetches saved control items for group
                                $saved_control_items = 
$this->so_control_item_list->get_control_items_by_control_and_group($control_id,
 $control_group->get_id());
                                
                                if(count($saved_control_items) > 0)             
                

Modified: trunk/controller/inc/helper/class.check_list_status_manager.inc.php
===================================================================
--- trunk/controller/inc/helper/class.check_list_status_manager.inc.php 
2012-04-13 07:20:40 UTC (rev 9138)
+++ trunk/controller/inc/helper/class.check_list_status_manager.inc.php 
2012-04-13 07:54:54 UTC (rev 9139)
@@ -45,27 +45,27 @@
        
                        $todays_date_ts = mktime(0,0,0,date("m"), date("d"), 
date("Y"));
        
-                       if( $this->check_list->get_status() == 
controller_check_list::STATUS_OPEN & $this->check_list->get_planned_date() > 0 
& $this->check_list->get_deadline() > $todays_date_ts)
+                       if( $this->check_list->get_status() == 
controller_check_list::STATUS_NOT_DONE & $this->check_list->get_planned_date() 
> 0 & $this->check_list->get_deadline() > $todays_date_ts)
                        {
                                $status = "control_planned";
                        }
-                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_OPEN & $this->check_list->get_planned_date() > 0 
& $this->check_list->get_deadline() < $todays_date_ts )
+                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_NOT_DONE & $this->check_list->get_planned_date() 
> 0 & $this->check_list->get_deadline() < $todays_date_ts )
                        {
                                $status = "control_not_accomplished_with_info";
                        }
-                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_OPEN & $this->check_list->get_deadline() < 
$todays_date_ts )
+                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_NOT_DONE & $this->check_list->get_deadline() < 
$todays_date_ts )
                        {
                                $status = "control_not_accomplished";
                        }
-                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_CLOSED & $this->check_list->get_completed_date() 
> $this->check_list->get_deadline() & $this->check_list->get_num_open_cases() 
== 0)
+                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_DONE & $this->check_list->get_completed_date() > 
$this->check_list->get_deadline() & $this->check_list->get_num_open_cases() == 
0)
                        {
                                $status = 
"control_accomplished_over_time_without_errors";
                        }
-                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_CLOSED & $this->check_list->get_completed_date() 
< $this->check_list->get_deadline() & $this->check_list->get_num_open_cases() 
== 0)
+                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_DONE & $this->check_list->get_completed_date() < 
$this->check_list->get_deadline() & $this->check_list->get_num_open_cases() == 
0)
                        {
                                $status = 
"control_accomplished_in_time_without_errors";
                        }
-                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_CLOSED & $this->check_list->get_num_open_cases() 
> 0){
+                       else if( $this->check_list->get_status() == 
controller_check_list::STATUS_DONE & $this->check_list->get_num_open_cases() > 
0){
                                $status = "control_accomplished_with_errors";
                                
$check_list_status_info->set_num_open_cases($this->check_list->get_num_open_cases());
                        }

Modified: trunk/controller/inc/model/class.check_list.inc.php
===================================================================
--- trunk/controller/inc/model/class.check_list.inc.php 2012-04-13 07:20:40 UTC 
(rev 9138)
+++ trunk/controller/inc/model/class.check_list.inc.php 2012-04-13 07:54:54 UTC 
(rev 9139)
@@ -33,8 +33,8 @@
        class controller_check_list extends controller_model
        {
                public static $so;
-               
-               const STATUS_UNDONE = 0;
+                               
+               const STATUS_NOT_DONE = 0;
                const STATUS_DONE = 1;
                const STATUS_CANCELED = 3;
                




reply via email to

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