fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11658] controller: liste location names


From: Sigurd Nes
Subject: [Fmsystem-commits] [11658] controller: liste location names
Date: Wed, 05 Feb 2014 17:30:46 +0000

Revision: 11658
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11658
Author:   sigurdne
Date:     2014-02-05 17:30:46 +0000 (Wed, 05 Feb 2014)
Log Message:
-----------
controller: liste location names

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

Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php       2014-02-04 11:33:07 UTC 
(rev 11657)
+++ trunk/controller/inc/class.uicalendar.inc.php       2014-02-05 17:30:46 UTC 
(rev 11658)
@@ -517,6 +517,23 @@
                                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()));
+                                       
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();
@@ -624,6 +641,7 @@
 
                public function view_calendar_month_for_locations()
                {
+                       static $_location_name = array();
                        $control_id = phpgw::get_var('control_id');
                        $control = $this->so_control->get_single($control_id);
                        $year = intval(phpgw::get_var('year'));
@@ -684,6 +702,23 @@
                        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()));
+                                       
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();




reply via email to

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