[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11389] controller: location info for components
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11389] controller: location info for components |
Date: |
Thu, 24 Oct 2013 14:10:30 +0000 |
Revision: 11389
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11389
Author: sigurdne
Date: 2013-10-24 14:10:30 +0000 (Thu, 24 Oct 2013)
Log Message:
-----------
controller: location info for components
Modified Paths:
--------------
trunk/property/inc/class.bolocation.inc.php
Modified: trunk/property/inc/class.bolocation.inc.php
===================================================================
--- trunk/property/inc/class.bolocation.inc.php 2013-10-24 14:09:44 UTC (rev
11388)
+++ trunk/property/inc/class.bolocation.inc.php 2013-10-24 14:10:30 UTC (rev
11389)
@@ -1014,4 +1014,38 @@
return $this->so->get_locations_by_name($data);
}
+
+
+
+ /**
+ * Get location name
+ *
+ * @return string location name
+ */
+ public function get_location_name($location_code)
+ {
+ static $locations = array();
+
+ if(!isset($locations[$location_code]))
+ {
+ $_location_info = $this->read_single( array
+ (
+ 'location_code' =>
$location_code,
+ 'extra' =>
array('noattrib' => true)
+ )
+ );
+
+ $_loc_name_arr = array();
+ $_level = count(explode('-', $location_code))
+1;
+ for ($i=1; $i < $_level ;$i++)
+ {
+ $_loc_name_arr[] =
$_location_info["loc{$i}_name"];
+ }
+
+ $locations[$location_code] = implode(' |
',$_loc_name_arr);
+ }
+ return $locations[$location_code];
+ }
+
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11389] controller: location info for components,
Sigurd Nes <=