[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9642] property: tweak read_single_eav()
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9642] property: tweak read_single_eav() |
Date: |
Thu, 21 Jun 2012 12:22:13 +0000 |
Revision: 9642
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9642
Author: sigurdne
Date: 2012-06-21 12:22:12 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
property: tweak read_single_eav()
Modified Paths:
--------------
trunk/property/inc/class.soentity.inc.php
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2012-06-21 09:13:57 UTC (rev
9641)
+++ trunk/property/inc/class.soentity.inc.php 2012-06-21 12:22:12 UTC (rev
9642)
@@ -1560,16 +1560,27 @@
function read_single_eav($data, $values = array())
{
+ $sql = '';
+
if(isset($data['guid']) && $data['guid'])
{
$sql = "SELECT * FROM fm_bim_item WHERE guid =
'{$data['guid']}'";
}
+ else if ( isset($data['location_id']) &&
$data['location_id'])
+ {
+ $id = (int)$data['id'];
+ $location_id = (int) $data['location_id'];
+ }
else
{
$id = (int)$data['id'];
$location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
".{$this->type}.{$data['entity_id']}.{$data['cat_id']}");
- $sql = "SELECT fm_bim_item.* FROM fm_bim_item
{$this->join} fm_bim_type ON fm_bim_type.id = fm_bim_item.type WHERE
fm_bim_item.id = {$id} AND location_id = $location_id";
}
+
+ if(!$sql)
+ {
+ $sql = "SELECT fm_bim_item.* FROM fm_bim_item
{$this->join} fm_bim_type ON fm_bim_type.id = fm_bim_item.type WHERE
fm_bim_item.id = {$id} AND location_id = $location_id";
+ }
$this->db->query($sql,__LINE__,__FILE__);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9642] property: tweak read_single_eav(),
Sigurd Nes <=