fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8762]


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [8762]
Date: Thu, 02 Feb 2012 12:04:23 +0000

Revision: 8762
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8762
Author:   erikhl
Date:     2012-02-02 12:04:19 +0000 (Thu, 02 Feb 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.socontrol.inc.php
    trunk/controller/inc/class.uicontrol.inc.php

Modified: trunk/controller/inc/class.socontrol.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol.inc.php        2012-02-02 11:57:04 UTC 
(rev 8761)
+++ trunk/controller/inc/class.socontrol.inc.php        2012-02-02 12:04:19 UTC 
(rev 8762)
@@ -329,7 +329,7 @@
 
                        $tables = "controller_control";
                        //$joins = " {$this->left_join} rental_document_types 
ON (rental_document.type_id = rental_document_types.id)";
-                       $joins = " {$this->left_join} controller_control_area 
ON (controller_control.control_area_id = controller_control_area.id)";
+                       //$joins = " {$this->left_join} controller_control_area 
ON (controller_control.control_area_id = controller_control_area.id)";
                        $joins .= " {$this->left_join} controller_procedure ON 
(controller_control.procedure_id = controller_procedure.id)";
                        $joins .= " {$this->left_join} fm_responsibility_role 
ON (controller_control.responsibility_id = fm_responsibility_role.id)";
 
@@ -339,7 +339,7 @@
                        }
                        else
                        {
-                               $cols = 'controller_control.id, 
controller_control.title, controller_control.description, 
controller_control.start_date, controller_control.end_date, 
controller_control.procedure_id, controller_control.control_area_id, 
controller_control.requirement_id, controller_control.costresponsibility_id, 
controller_control.responsibility_id, controller_control.component_type_id, 
controller_control.component_id, controller_control.location_code, 
controller_control.repeat_type, controller_control.repeat_interval, 
controller_control.enabled, controller_control_area.title AS control_area_name, 
controller_procedure.title AS procedure_name, fm_responsibility_role.name AS 
responsibility_name ';
+                               $cols = 'controller_control.id, 
controller_control.title, controller_control.description, 
controller_control.start_date, controller_control.end_date, 
controller_control.procedure_id, controller_control.control_area_id, 
controller_control.requirement_id, controller_control.costresponsibility_id, 
controller_control.responsibility_id, controller_control.component_type_id, 
controller_control.component_id, controller_control.location_code, 
controller_control.repeat_type, controller_control.repeat_interval, 
controller_control.enabled, controller_procedure.title AS procedure_name, 
fm_responsibility_role.name AS responsibility_name ';
                        }
 
                        $dir = $ascending ? 'ASC' : 'DESC';
@@ -373,7 +373,9 @@
                                
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
                                
$control->set_responsibility_name($this->unmarshal($this->db->f('responsibility_name',
 true), 'string'));
                                
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id', 
true), 'int'));
-                               
$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
+                               
//$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
+                               $category = 
execMethod('phpgwapi.categories.return_single', 
$this->unmarshal($this->db->f('control_area_id', 'int')));
+                               
$control->set_control_area_name($category[0]['name']);
        //                      
$control->set_control_group_id($this->unmarshal($this->db->f('control_group_id',
 true), 'int'));
                                
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
 true), 'int'));
                                
$control->set_component_id($this->unmarshal($this->db->f('component_id', true), 
'int'));
@@ -395,11 +397,11 @@
                {
                        $id = (int)$id;
 
-                       $joins = " {$this->left_join} controller_control_area 
ON (c.control_area_id = controller_control_area.id)";
+                       //$joins = " {$this->left_join} controller_control_area 
ON (c.control_area_id = controller_control_area.id)";
                        $joins .= " {$this->left_join} controller_procedure ON 
(c.procedure_id = controller_procedure.id)";
                        $joins .= " {$this->left_join} fm_responsibility_role 
ON (c.responsibility_id = fm_responsibility_role.id)";
 
-                       $sql = "SELECT c.*, controller_control_area.title AS 
control_area_name, controller_procedure.title AS procedure_name, 
fm_responsibility_role.name AS responsibility_name FROM controller_control c 
{$joins} WHERE c.id = " . $id;
+                       $sql = "SELECT c.*, controller_procedure.title AS 
procedure_name, fm_responsibility_role.name AS responsibility_name FROM 
controller_control c {$joins} WHERE c.id = " . $id;
                        $this->db->limit_query($sql, 0, __LINE__, __FILE__, 1);
                        $this->db->next_record();
 
@@ -416,7 +418,9 @@
                        
$control->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id',
 true), 'int'));
                        
$control->set_responsibility_name($this->unmarshal($this->db->f('responsibility_name',
 true), 'string'));
                        
$control->set_control_area_id($this->unmarshal($this->db->f('control_area_id', 
true), 'int'));
-                       
$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
+                       
//$control->set_control_area_name($this->unmarshal($this->db->f('control_area_name',
 true), 'string'));
+                       $category = 
execMethod('phpgwapi.categories.return_single', 
$this->unmarshal($this->db->f('control_area_id', 'int')));
+                       $control->set_control_area_name($category[0]['name']);
                        
$control->set_component_type_id($this->unmarshal($this->db->f('component_type_id',
 true), 'int'));
                        
$control->set_component_id($this->unmarshal($this->db->f('component_id', true), 
'int'));
                        
$control->set_location_code($this->unmarshal($this->db->f('location_code', 
true), 'string'));

Modified: trunk/controller/inc/class.uicontrol.inc.php
===================================================================
--- trunk/controller/inc/class.uicontrol.inc.php        2012-02-02 11:57:04 UTC 
(rev 8761)
+++ trunk/controller/inc/class.uicontrol.inc.php        2012-02-02 12:04:19 UTC 
(rev 8762)
@@ -152,15 +152,10 @@
                                     )
                                 )
                             ),
-                                                       array('type' => 
'filter',
-                                                               'name' => 
'control_areas',
-                                'text' => lang('Control_area'),
-                                'list' => 
$this->so_control_area->get_control_area_select_array(),
-                                                       ),
                                                        //as categories
                                                        array('type' => 
'filter',
                                                                'name' => 
'control_areas',
-                                                               'text' => 
lang('Control_area') . 2,
+                                                               'text' => 
lang('Control_area'),
                                                                'list' => 
$control_areas_array2,
                                                        ),
                                                        array('type' => 
'filter',
@@ -605,9 +600,6 @@
                                return null;
                }
                
-               public function query(){}
-               
-               /*
                // Returns locations for a control
                public function get_locations_for_control()
                {
@@ -658,7 +650,7 @@
                        
                        $this->so->register_control_to_location($control_id, 
$location_code);
                }
-               
+       
                public function query()
                {
                        $params = array(
@@ -730,5 +722,5 @@
 
                        return $this->yui_results($results);
                }
-               */
+
        }




reply via email to

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