fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9651]


From: Torstein
Subject: [Fmsystem-commits] [9651]
Date: Fri, 22 Jun 2012 12:43:43 +0000

Revision: 9651
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9651
Author:   vator
Date:     2012-06-22 12:43:41 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.socontrol.inc.php
    trunk/controller/inc/class.uicalendar.inc.php
    trunk/controller/inc/model/class.component.inc.php

Modified: trunk/controller/inc/class.socontrol.inc.php
===================================================================
--- trunk/controller/inc/class.socontrol.inc.php        2012-06-22 12:31:51 UTC 
(rev 9650)
+++ trunk/controller/inc/class.socontrol.inc.php        2012-06-22 12:43:41 UTC 
(rev 9651)
@@ -236,7 +236,7 @@
                        $sql  .= "bim_item.type as component_type, bim_item.id 
as component_id, bim_item.location_code, bim_item.address, ";
                        //$sql  .= "cast(xpath('*/text()', xml_representation) 
as text[]) AS xml ";
                        //$sql  .= "xpath('/', bim_item.xml_representation) as 
xml ";
-                       $sql  .= "bim_item.xml_representation as xml ";
+                       $sql  .= "bim_item.xml_representation as xml, 
cl.location_id ";
                        $sql  .= "FROM controller_control_component_list cl ";
                        $sql  .= "JOIN fm_bim_item bim_item on cl.component_id 
= bim_item.id ";
                        $sql  .= "JOIN fm_bim_type bim_type on cl.location_id = 
bim_type.location_id ";
@@ -276,6 +276,7 @@
                                        $component = new controller_component();
                                        
$component->set_type($this->unmarshal($this->db->f('component_type', true), 
'int'));
                                        
$component->set_id($this->unmarshal($this->db->f('component_id', true), 'int'));
+                                       
$component->set_location_id($this->unmarshal($this->db->f('location_id', true), 
'int'));
                                        
$component->set_guid($this->unmarshal($this->db->f('guid', true), 'string'));
                                        
$component->set_xml($this->unmarshal($this->db->f('xml', true), 'string'));
                                        
$component->set_location_code($this->unmarshal($this->db->f('location_code', 
true), 'string'));

Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php       2012-06-22 12:31:51 UTC 
(rev 9650)
+++ trunk/controller/inc/class.uicalendar.inc.php       2012-06-22 12:43:41 UTC 
(rev 9651)
@@ -257,9 +257,10 @@
                        // COMPONENTS
                        foreach($components_with_controls_array as $component){
                                
-                               $location_id = 2295; //Eksempel: Valglokaler
+                               //$location_id = 2295; //Eksempel: Valglokaler
                                
-                               //$location_id = $component->get_type();
+                               $location_id = $component->get_location_id();
+                               echo " location_id: " . $location_id;
                                $system_location = 
$GLOBALS['phpgw']->locations->get_name($location_id);
                                $filters = array("short_description" => "IS NOT 
NULL");
                                $attributes['attributes'] = 
$GLOBALS['phpgw']->custom_fields->find($system_location['appname'],$system_location['location'],
 0, '', 'ASC', 'attrib_sort', true, true);

Modified: trunk/controller/inc/model/class.component.inc.php
===================================================================
--- trunk/controller/inc/model/class.component.inc.php  2012-06-22 12:31:51 UTC 
(rev 9650)
+++ trunk/controller/inc/model/class.component.inc.php  2012-06-22 12:43:41 UTC 
(rev 9651)
@@ -35,6 +35,7 @@
        {
                protected $type;
                protected $id;
+               protected $location_id;
                protected $guid;
                protected $xml;
                // Not a table column
@@ -67,6 +68,13 @@
                
                public function get_id() { return $this->id; }
                
+               public function set_location_id($location_id)
+               {
+                       $this->location_id = $location_id;
+               }
+               
+               public function get_location_id() { return $this->location_id; }
+               
                public function set_guid($guid)
                {
                        $this->guid = $guid;




reply via email to

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