[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.solocation.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.solocation.inc.php |
Date: |
Mon, 24 Sep 2007 13:02:10 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 07/09/24 13:02:10
Modified files:
inc : class.solocation.inc.php
Log message:
update custom user colomns in main list
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.solocation.inc.php?cvsroot=phpgroupware&r1=1.49&r2=1.50
Patches:
Index: class.solocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- class.solocation.inc.php 21 Sep 2007 19:28:56 -0000 1.49
+++ class.solocation.inc.php 24 Sep 2007 13:02:10 -0000 1.50
@@ -24,7 +24,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.49 2007/09/21 19:28:56
sigurdne Exp $
+ * @version $Id: class.solocation.inc.php,v 1.50 2007/09/24 13:02:10
sigurdne Exp $
*/
/**
@@ -384,47 +384,6 @@
}
}
- $fm_location_cols =
$this->soadmin_location->read_attrib(array('type_id'=>$type_id,'lookup_type'=>$type_id));
-
- $k = count($uicols['name']);
- $location_cols_count =
count($fm_location_cols);
-
- for ($i=0;$i<$location_cols_count;$i++)
- {
- if($fm_location_cols[$i]['list']==1)
- {
- $cols .= ",fm_location" .
$fm_location_cols[$i]['location_type']
.".".$fm_location_cols[$i]['column_name'];
- $cols_return[]
= $fm_location_cols[$i]['column_name'];
- $uicols['input_type'][]
= 'text';
- $uicols['name'][]
= $fm_location_cols[$i]['column_name'];
- $uicols['descr'][]
= $fm_location_cols[$i]['input_text'];
- $uicols['statustext'][]
= $fm_location_cols[$i]['statustext'];
-
-
if(($fm_location_cols[$i]['datatype'] == 'I' ||
$fm_location_cols[$i]['datatype'] == 'N'))
- {
- $uicols['align'][$k] =
'right';
- }
-
-
$uicols['cols_return_extra'][$k]= array(
- 'id' => $k,
- 'name' =>
$fm_location_cols[$i]['column_name'],
- 'datatype' =>
$fm_location_cols[$i]['datatype'],
- 'attrib_id' =>
$fm_location_cols[$i]['id']
- );
- $k++;
-
-
if($fm_location_cols[$i]['lookup_form']==1)
- {
- $uicols['exchange'][]
= True;
- }
- else
- {
- $uicols['exchange'][]
= False;
- }
- }
- }
-
-
$from = " FROM $paranthesis fm_location$type_id
";
$sql = "SELECT $cols $from $joinmethod";
@@ -444,12 +403,12 @@
}
//---------------------start custom user cols
- $fm_location_cols =
$this->soadmin_location->read_attrib(array('type_id'=>$type_id,'allrows'=>true));
+ $fm_location_cols =
$this->soadmin_location->read_attrib(array('type_id'=>$type_id,'lookup_type'=>$type_id,
'allrows'=>true));
$result_columns = array();
foreach ($fm_location_cols as $col_entry)
{
- if ($col_entry['list'])
+ if ($col_entry['list']==1)
{
$result_columns[] =
$col_entry['id'];
}
@@ -466,6 +425,7 @@
$i = count($uicols['name']);
if(isset($result_columns) &&
is_array($result_columns))
{
+ $cols_extra ='';
foreach($result_columns as $column_id)
{
$this->db->query("SELECT * FROM
fm_location_attrib WHERE type_id= $type_id AND id= $column_id");
@@ -479,17 +439,23 @@
{
$uicols['input_type'][]
= 'text';
}
+ $cols_extra .=
",fm_location{$type_id}.". $this->db->f('column_name');
+ $cols_return[]
= $this->db->f('column_name');
$uicols['name'][]
= $this->db->f('column_name');
$uicols['descr'][]
= $this->db->f('input_text');
$uicols['statustext'][]
= $this->db->f('statustext');
- $uicols['datatype'][$i]
= $this->db->f('datatype');
- $cols_return_extra[]= array(
+ $uicols['datatype'][]
= $this->db->f('datatype');
+
+
$uicols['cols_return_extra'][$i]= array(
'name' =>
$this->db->f('column_name'),
'datatype' =>
$this->db->f('datatype'),
- 'attrib_id' =>
$this->db->f('id')
+ 'statustext' =>
$this->db->f('statustext'),
+ 'descr'
=> $this->db->f('input_text'),
);
+
$i++;
}
+ $sql = str_replace('FROM' , $cols_extra
. ' FROM', $sql);
}
//---------------------end custom user cols
@@ -597,6 +563,7 @@
$sql .= "$filtermethod $querymethod";
//echo $sql;
+
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.solocation.inc.php,
Sigurd Nes <=