fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11102] more on controller


From: Sigurd Nes
Subject: [Fmsystem-commits] [11102] more on controller
Date: Fri, 10 May 2013 13:55:43 +0000

Revision: 11102
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11102
Author:   sigurdne
Date:     2013-05-10 13:55:35 +0000 (Fri, 10 May 2013)
Log Message:
-----------
more on controller

Modified Paths:
--------------
    trunk/controller/inc/class.uicalendar.inc.php
    trunk/controller/inc/class.uicheck_list.inc.php

Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php       2013-05-10 12:50:17 UTC 
(rev 11101)
+++ trunk/controller/inc/class.uicalendar.inc.php       2013-05-10 13:55:35 UTC 
(rev 11102)
@@ -443,6 +443,8 @@
 
                public function view_calendar_year_for_locations()
                {
+                       static $_location_name = array();
+
                        $control_id = phpgw::get_var('control_id');
                        $control = $this->so_control->get_single($control_id);
                        $year = phpgw::get_var('year');
@@ -530,6 +532,28 @@
                                foreach ($components_for_control_array as 
$component)
                                {
                                        $short_desc_arr = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$component->get_location_id(), 'id' => $component->get_id()));
+
+                                       //FIXME - make generic
+                                       
+                               /*=>*/
+                                       
if(!isset($_location_name[$component->get_location_code()]))
+                                       {
+                                               $_location = 
execMethod('property.solocation.read_single', $component->get_location_code());
+                                               $location_arr = explode('-', 
$component->get_location_code());
+                                               $i=1;
+                                               $name_arr = array();
+                                               foreach($location_arr as 
$_dummy)
+                                               {
+                                                       $name_arr[] = 
$_location["loc{$i}_name"];
+                                                       $i++;
+                                               }
+
+                                               
$_location_name[$component->get_location_code()]= implode('::', $name_arr);
+                                       }
+
+                                       $short_desc_arr .= ' ['. 
$_location_name[$component->get_location_code()] . ']';
+                               /*<=*/
+
                                        
$component->set_xml_short_desc($short_desc_arr);
 
                                        $repeat_type = 
$control->get_repeat_type();

Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php     2013-05-10 12:50:17 UTC 
(rev 11101)
+++ trunk/controller/inc/class.uicheck_list.inc.php     2013-05-10 13:55:35 UTC 
(rev 11102)
@@ -241,6 +241,7 @@
                                $level = 
$this->location_finder->get_location_level($location_code);
                        }
 
+
                        if($type == "component")
                        {
                                if($check_list != null)
@@ -252,6 +253,15 @@
                                }
 
                                $component_arr = 
execMethod('property.soentity.read_single_eav', array('location_id' => 
$location_id, 'id' => $component_id));
+
+//
+                               $location_code = 
$component_arr['location_code'];
+
+                               $check_list->set_location_code($location_code);
+                               $location_array = 
execMethod('property.bolocation.read_single', array('location_code' => 
$check_list->get_location_code()));
+                               $level = 
$this->location_finder->get_location_level($location_code);
+
+//
                                $short_desc = 
execMethod('property.soentity.get_short_description', array('location_id' => 
$location_id, 'id' => $component_id));
 
                                $component = new controller_component();
@@ -260,6 +270,7 @@
 
                                $component_array = $component->toArray();
                                $building_location_code = 
$this->location_finder->get_building_location_code($component_arr['location_code']);
+
                                $type = "component";
                        }
                        else




reply via email to

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