[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.uilocation.inc.php class.sol...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.uilocation.inc.php class.sol... |
Date: |
Wed, 01 Mar 2006 12:27:15 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/03/01 12:27:15
Modified files:
inc : class.uilocation.inc.php
class.solocation.inc.php
class.bolocation.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uilocation.inc.php.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.solocation.inc.php.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.bolocation.inc.php.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: property/inc/class.bolocation.inc.php
diff -u property/inc/class.bolocation.inc.php:1.10
property/inc/class.bolocation.inc.php:1.11
--- property/inc/class.bolocation.inc.php:1.10 Fri Feb 3 12:05:49 2006
+++ property/inc/class.bolocation.inc.php Wed Mar 1 12:27:15 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.bolocation.inc.php,v 1.10 2006/02/03 12:05:49
sigurdne Exp $
+ * @version $Id: class.bolocation.inc.php,v 1.11 2006/03/01 12:27:15
sigurdne Exp $
*/
/**
@@ -173,9 +173,9 @@
return $this->bocommon->select_list($selected,$list);
}
- function read_entity_to_link()
+ function read_entity_to_link($location_code)
{
- return $this->so->read_entity_to_link();
+ return
$this->so->read_entity_to_link($location_code);
}
function get_owner_list($format='',$selected='')
Index: property/inc/class.solocation.inc.php
diff -u property/inc/class.solocation.inc.php:1.21
property/inc/class.solocation.inc.php:1.22
--- property/inc/class.solocation.inc.php:1.21 Mon Jan 30 22:14:19 2006
+++ property/inc/class.solocation.inc.php Wed Mar 1 12:27:15 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.solocation.inc.php,v 1.21 2006/01/30 22:14:19
sigurdne Exp $
+ * @version $Id: class.solocation.inc.php,v 1.22 2006/03/01 12:27:15
sigurdne Exp $
*/
/**
@@ -35,7 +35,7 @@
$this->like = $this->bocommon->like;
}
- function read_entity_to_link()
+ function read_entity_to_link($location_code)
{
$sql = "SELECT * FROM fm_entity_category where
loc_link=1";
@@ -43,13 +43,19 @@
while ($this->db->next_record())
{
- $entity[] = array
- (
- 'entity_id' =>
$this->db->f('entity_id'),
- 'cat_id' => $this->db->f('id'),
- 'name' => $this->db->f('name'),
- 'descr' => $this->db->f('descr')
- );
+ $sql = "SELECT count(*) as hits FROM
fm_entity_" . $this->db->f('entity_id') . "_" . $this->db->f('id') . " WHERE
location_code $this->like '$location_code%'";
+ $this->db2->query($sql,__LINE__,__FILE__);
+ $this->db2->next_record();
+ if($this->db2->f('hits'))
+ {
+ $entity[] = array
+ (
+ 'entity_id' =>
$this->db->f('entity_id'),
+ 'cat_id' =>
$this->db->f('id'),
+ 'name' =>
$this->db->f('name') . ' [' . $this->db2->f('hits') . ']',
+ 'descr' =>
$this->db->f('descr')
+ );
+ }
}
return $entity;
Index: property/inc/class.uilocation.inc.php
diff -u property/inc/class.uilocation.inc.php:1.18
property/inc/class.uilocation.inc.php:1.19
--- property/inc/class.uilocation.inc.php:1.18 Fri Feb 3 12:05:49 2006
+++ property/inc/class.uilocation.inc.php Wed Mar 1 12:27:15 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.uilocation.inc.php,v 1.18 2006/02/03 12:05:49
sigurdne Exp $
+ * @version $Id: class.uilocation.inc.php,v 1.19 2006/03/01 12:27:15
sigurdne Exp $
*/
/**
@@ -860,28 +860,26 @@
}
- $entities= $this->bo->read_entity_to_link();
-
- if (isset($entities) AND is_array($entities))
+ if($location_code)
{
- foreach($entities as $entity_entry)
+ $change_type_list =
$this->bo->select_change_type($values['change_type']);
+
+ $entities=
$this->bo->read_entity_to_link($location_code);
+ if (isset($entities) AND is_array($entities))
{
- $entities_link[] = array
- (
- 'entity_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uientity.index&entity_id='
. $entity_entry['entity_id'] . '&cat_id=' . $entity_entry['cat_id'] .
'&query=' . $location_code),
- 'lang_entity_statustext'
=> $entity_entry['descr'],
- 'text_entity'
=> $entity_entry['name'],
- );
+ foreach($entities as $entity_entry)
+ {
+ $entities_link[] = array
+ (
+ 'entity_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uientity.index&entity_id='
. $entity_entry['entity_id'] . '&cat_id=' . $entity_entry['cat_id'] .
'&query=' . $location_code),
+
'lang_entity_statustext' => $entity_entry['descr'],
+ 'text_entity'
=> $entity_entry['name'],
+ );
+ }
}
}
-
- if($location_code)
- {
- $change_type_list =
$this->bo->select_change_type($values['change_type']);
- }
-
$data = array
(
'lang_change_type'
=> lang('Change type'),
@@ -1232,19 +1230,19 @@
if($config[$j]['column_name']=='part_of_town_id')
{
$edit_part_of_town=True;
- $select_name_part_of_town
= 'part_of_town_id';
- $part_of_town_list
=
$this->bocommon->select_part_of_town('select',$values['part_of_town_id']);
- $lang_town_statustext
= lang('Select the part of town the property belongs to. To do not use
a part of town - select NO PART OF TOWN');
- $insert_record[] =
'part_of_town_id';
+ $select_name_part_of_town
= 'part_of_town_id';
+ $part_of_town_list
= $this->bocommon->select_part_of_town('select',$values['part_of_town_id']);
+ $lang_town_statustext
= lang('Select the part of town the property belongs to. To do not use a part
of town - select NO PART OF TOWN');
+ $insert_record[]
= 'part_of_town_id';
}
if($config[$j]['column_name']=='owner_id')
{
$edit_owner=True;
- $lang_owner
= lang('Owner');
- $owner_list
= $this->bo->get_owner_list('',$values['owner_id']);
- $lang_select_owner
= lang('Select owner');
- $lang_owner_statustext
= lang('Select the owner');
- $insert_record[] =
'owner_id';
+ $lang_owner
= lang('Owner');
+ $owner_list
= $this->bo->get_owner_list('',$values['owner_id']);
+ $lang_select_owner
= lang('Select owner');
+ $lang_owner_statustext
= lang('Select the owner');
+ $insert_record[]
= 'owner_id';
}
}
}
@@ -1258,8 +1256,7 @@
$dateformat= (implode($sep,$dlarr));
-
- $entities= $this->bo->read_entity_to_link();
+ $entities=
$this->bo->read_entity_to_link($location_code);
if (isset($entities) AND is_array($entities))
{
@@ -1268,9 +1265,9 @@
{
$entities_link[] = array
(
- 'entity_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uientity.index&entity_id='
. $entity_entry['entity_id'] . '&cat_id=' . $entity_entry['cat_id'] .
'&query=' . $location_code),
+ 'entity_link'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uientity.index&entity_id='
. $entity_entry['entity_id'] . '&cat_id=' . $entity_entry['cat_id'] .
'&query=' . $location_code),
'lang_entity_statustext'
=> $entity_entry['descr'],
- 'text_entity'
=> $entity_entry['name'],
+ 'text_entity'
=> $entity_entry['name'],
);
}
}
- [Phpgroupware-cvs] property/inc class.uilocation.inc.php class.sol...,
Sigurd Nes <=