fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9749] Slettet metoden get_agg_check_lists_for_locati


From: Torstein
Subject: [Fmsystem-commits] [9749] Slettet metoden get_agg_check_lists_for_location.
Date: Thu, 05 Jul 2012 10:43:54 +0000

Revision: 9749
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9749
Author:   vator
Date:     2012-07-05 10:43:53 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
Slettet metoden get_agg_check_lists_for_location. Den er ikke i bruk

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

Modified: trunk/controller/inc/class.socheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.socheck_list.inc.php     2012-07-05 09:35:12 UTC 
(rev 9748)
+++ trunk/controller/inc/class.socheck_list.inc.php     2012-07-05 10:43:53 UTC 
(rev 9749)
@@ -343,67 +343,6 @@
                }
        }
        
-       /* 
-        * TROR IKKE VI BRUKER DENNE: TORSTEIN 18.06.2012
-        function get_agg_check_lists_for_location( $location_code, 
$from_date_ts, $to_date_ts, $control_id = 0 ){
-                               
-               $sql =  "SELECT c.id as c_id, title, start_date, end_date, 
cl.id as cl_id, c.repeat_type, c.repeat_interval, cl.deadline, 
count(cl.num_open_cases) ";
-               $sql .= "FROM controller_check_list cl, controller_control c, 
controller_check_item ci ";
-               $sql .= "WHERE cl.location_code = '{$location_code}' ";
-               
-               if($control_id > 0)
-               {
-                       $sql .= "AND c.id = {$control_id} ";
-               }
-               
-               $sql .= "AND c.repeat_type < 2 ";
-               $sql .= "AND cl.control_id = c.id ";
-               $sql .= "AND deadline BETWEEN $from_date_ts AND $to_date_ts ";
-               $sql .= "GROUP BY c.id, title, start_date, end_date, cl.id, 
cl.deadline, c.repeat_type, c.repeat_interval ";
-               $sql .= "ORDER BY c.id";
-
-               $this->db->query($sql);
-               
-               $control_id = 0;
-               $controls_array = array();
-               $check_list_array = array();
-               while ($this->db->next_record()) {
-                       
-                       if( $this->db->f('c_id', true) != $control_id ){
-                               if($control_id != 0){
-                                       $controls_array[] = array( "control" => 
$control_array, "check_list" => $check_list_array);
-                                       $check_list_array = array();
-                               }
-                               
-                               $control_array = array(
-                                                                               
                                                "id"                            
                => $this->unmarshal($this->db->f('c_id', true), 'int'),
-                                                                               
                                                "title"                         
        => $this->unmarshal($this->db->f('title', true), 'string'),
-                                                                               
                                                "repeat_type"     => 
$this->unmarshal($this->db->f('repeat_type', true), 'int'),
-                                                                               
                                                "repeat_interval" => 
$this->unmarshal($this->db->f('repeat_interval', true), 'int'),
-                                                                               
                                                "start_date"                    
=> $this->unmarshal($this->db->f('start_date', true), 'int'),
-                                                                               
                                                "end_date"                      
        => $this->unmarshal($this->db->f('end_date', true), 'int')
-                                                                               
                                        );
-                       }
-
-                       $check_list_array[] = array(
-                                                                               
"cl_id"         => $this->db->f('cl_id', true),
-                                                                               
"deadline"      => $this->db->f('deadline', true),
-                                                                               
"count"         => $this->db->f('count', true)
-                                                                       );
-                       
-                       $control_id = $this->db->f('c_id', true);
-               }               
-               
-               if( !empty( $control_array ) ){
-                       $controls_array[] = array( "control" => $control_array, 
"check_list" => $check_list_array);
-                       
-                       return $controls_array;
-               }else {
-                       return null;
-               }       
-       }
-*/ 
-       
        function get_num_open_cases_for_control( $cl_criteria, $from_date_ts, 
$to_date_ts ){
                
                $sql =  "SELECT c.id as c_id, sum(cl.num_open_cases) as count ";




reply via email to

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