[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11440] property: bugfix
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11440] property: bugfix |
Date: |
Fri, 08 Nov 2013 14:18:40 +0000 |
Revision: 11440
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11440
Author: sigurdne
Date: 2013-11-08 14:18:40 +0000 (Fri, 08 Nov 2013)
Log Message:
-----------
property: bugfix
Modified Paths:
--------------
trunk/property/inc/class.soentity.inc.php
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2013-11-07 19:35:12 UTC (rev
11439)
+++ trunk/property/inc/class.soentity.inc.php 2013-11-08 14:18:40 UTC (rev
11440)
@@ -2281,8 +2281,8 @@
$cat_id = (int)$data['cat_id'];
$entity_id = (int)$data['entity_id'];
- $id = $data['id'];
- $location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
".{$this->type}.{$entity_id}.{$cat_id}");
+ $p_id = $data['id'];
+ $p_location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
".{$this->type}.{$entity_id}.{$cat_id}");
$entity = array();
foreach ($this->type_app as $type => $app)
@@ -2317,12 +2317,15 @@
if($entry['is_eav'])
{
- $sql = "SELECT count(*) as hits
FROM fm_bim_item WHERE p_location_id = {$location_id} AND p_id = '{$id}'";
+ $location_id =
$GLOBALS['phpgw']->locations->get_id($this->type_app[$type],
".{$type}.{$entry['entity_id']}.{$entry['cat_id']}");
+
+ $sql = "SELECT count(*) as hits
FROM fm_bim_item WHERE location_id = {$location_id} AND p_location_id =
{$p_location_id} AND p_id = '{$p_id}'";
}
else
{
- $sql = "SELECT count(*) as hits
FROM fm_{$type}_{$entry['entity_id']}_{$entry['cat_id']} WHERE p_entity_id =
{$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$id}'";
+ $sql = "SELECT count(*) as hits
FROM fm_{$type}_{$entry['entity_id']}_{$entry['cat_id']} WHERE p_entity_id =
{$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$p_id}'";
}
+
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
if($this->db->f('hits'))
@@ -2336,7 +2339,7 @@
'cat_id' => $entry['cat_id'],
'p_entity_id' => $entity_id,
'p_cat_id' => $cat_id,
- 'p_num'
=> $id,
+ 'p_num'
=> $p_id,
'type'
=> $type
)
),
@@ -2347,7 +2350,7 @@
}
}
- $sql = "SELECT count(*) as hits FROM fm_tts_tickets
WHERE p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$id}'";
+ $sql = "SELECT count(*) as hits FROM fm_tts_tickets
WHERE p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num =
'{$p_id}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
if($this->db->f('hits'))
@@ -2358,14 +2361,14 @@
'entity_link' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
'property.uitts.index',
// 'p_entity_id' => $entity_id,
// 'p_cat_id' =>
$cat_id,
- 'p_num' => $id,
- 'query'=>
"entity.{$entity_id}.{$cat_id}.{$id}")),
+ 'p_num' =>
$p_id,
+ 'query'=>
"entity.{$entity_id}.{$cat_id}.{$p_id}")),
'name' =>
lang('Helpdesk') . " [{$hits}]",
'descr' =>
lang('Helpdesk')
);
}
- $sql = "SELECT count(*) as hits FROM fm_request WHERE
p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$id}'";
+ $sql = "SELECT count(*) as hits FROM fm_request WHERE
p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$p_id}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
if($this->db->f('hits'))
@@ -2376,14 +2379,14 @@
'entity_link' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction' =>
'property.uirequest.index',
// 'p_entity_id' => $entity_id,
// 'p_cat_id' =>
$cat_id,
- 'p_num' => $id,
- 'query'=>
"entity.{$entity_id}.{$cat_id}.{$id}")),
+ 'p_num' =>
$p_id,
+ 'query'=>
"entity.{$entity_id}.{$cat_id}.{$p_id}")),
'name' =>
lang('request') . " [{$hits}]",
'descr' =>
lang('request')
);
}
- $sql = "SELECT count(*) as hits FROM fm_project WHERE
p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$id}'";
+ $sql = "SELECT count(*) as hits FROM fm_project WHERE
p_entity_id = {$entity_id} AND p_cat_id = {$cat_id} AND p_num = '{$p_id}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
if($this->db->f('hits'))
@@ -2392,14 +2395,14 @@
$entity['related'][] = array
(
'entity_link' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction' =>
'property.uiproject.index',
- 'query'=>
"entity.{$entity_id}.{$cat_id}.{$id}",
+ 'query'=>
"entity.{$entity_id}.{$cat_id}.{$p_id}",
'criteria_id' => 6)), //FIXME:
criteria 6 is for entities should be altered to locations
'name' =>
lang('project') . " [{$hits}]",
'descr' =>
lang('project')
);
}
- $sql = "SELECT count(*) as hits FROM fm_s_agreement
{$this->join} fm_s_agreement_detail ON fm_s_agreement.id =
fm_s_agreement_detail.agreement_id WHERE p_entity_id = {$entity_id} AND
p_cat_id = {$cat_id} AND p_num = '{$id}'";
+ $sql = "SELECT count(*) as hits FROM fm_s_agreement
{$this->join} fm_s_agreement_detail ON fm_s_agreement.id =
fm_s_agreement_detail.agreement_id WHERE p_entity_id = {$entity_id} AND
p_cat_id = {$cat_id} AND p_num = '{$p_id}'";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
if($this->db->f('hits'))
@@ -2408,8 +2411,8 @@
$entity['related'][] = array
(
'entity_link' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction' =>
'property.uis_agreement.index',
-
'query' =>
"entity.{$entity_id}.{$cat_id}.{$id}",
-
'p_num' => $id)),
+
'query' =>
"entity.{$entity_id}.{$cat_id}.{$p_id}",
+
'p_num' => $p_id)),
'name' =>
lang('service agreement') . " [{$hits}]",
'descr' =>
lang('service agreement')
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11440] property: bugfix,
Sigurd Nes <=