[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.bocommon.inc.php class.sodoc...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.bocommon.inc.php class.sodoc... |
Date: |
Fri, 06 Oct 2006 13:07:08 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/10/06 13:07:08
Modified files:
inc : class.bocommon.inc.php class.sodocument.inc.php
class.uidocument.inc.php
Log message:
fix
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.sodocument.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uidocument.inc.php?cvsroot=phpgroupware&r1=1.16&r2=1.17
Patches:
Index: class.bocommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- class.bocommon.inc.php 6 Oct 2006 12:23:22 -0000 1.44
+++ class.bocommon.inc.php 6 Oct 2006 13:07:07 -0000 1.45
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.bocommon.inc.php,v 1.44 2006/10/06 12:23:22
sigurdne Exp $
+ * @version $Id: class.bocommon.inc.php,v 1.45 2006/10/06 13:07:07
sigurdne Exp $
*/
/**
@@ -975,15 +975,24 @@
$lookup =
(isset($data['lookup'])?$data['lookup']:'');
$location_level =
(isset($data['location_level'])?$data['location_level']:'');
$no_address =
(isset($data['no_address'])?$data['no_address']:'');
-
+ $force_location =
(isset($data['force_location'])?$data['force_location']:'');
$soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
$location_types =
$soadmin_location->select_location_type();
$config = $soadmin_location->read_config('');
+ if($location_level || $force_location)
+ {
+
if($location_level)
{
- $type_id=$location_level;
+ $type_id = $location_level;
+ }
+ else
+ {
+ $type_id =
count($location_types);
+ }
+
$this->join = $this->socommon->join;
$joinmethod .= " $this->join fm_location1 ON
($entity_table.loc1 = fm_location1.loc1))";
$paranthesis .='(';
@@ -1001,7 +1010,6 @@
for ($i=0; $i<$type_id; $i++)
{
-
$uicols['input_type'][] = 'text';
$uicols['name'][] = 'loc' .
$location_types[$i]['id'];
$uicols['descr'][] =
$location_types[$i]['name'];
@@ -1061,7 +1069,6 @@
$uicols['statustext'][] =
lang('address');
}
-
$config_count = count($config);
for ($i=0;$i<$config_count;$i++)
{
Index: class.sodocument.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.sodocument.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- class.sodocument.inc.php 17 Apr 2006 11:36:05 -0000 1.11
+++ class.sodocument.inc.php 6 Oct 2006 13:07:08 -0000 1.12
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage document
- * @version $Id: class.sodocument.inc.php,v 1.11 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.sodocument.inc.php,v 1.12 2006/10/06 13:07:08
sigurdne Exp $
*/
/**
@@ -100,7 +100,7 @@
$document_table = 'fm_document';
- $cols .= $document_table . '.location_code';
+ $cols = $document_table . '.location_code';
$cols_return[] = 'location_code';
// $cols .= ",$document_table.id as document_id";
@@ -133,8 +133,15 @@
}
- $sql =
$this->bocommon->generate_sql(array('entity_table'=>$document_table,'cols'=>$cols,'cols_return'=>$cols_return,
-
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
+ $sql =
$this->bocommon->generate_sql(array('entity_table'=> $document_table,
+
'cols' => $cols,
+
'cols_return' => $cols_return,
+
'uicols' => $uicols,
+
'joinmethod' => $joinmethod,
+
'paranthesis' => $paranthesis,
+
'query' => $query,
+
'force_location'=> true
+
));
$this->bocommon->fm_cache('sql_document_' .
$entity_id,$sql);
@@ -176,6 +183,7 @@
$where= 'WHERE';
+ $filtermethod = '';
if(!$entity_id)
{
$filtermethod .= " $where ( fm_document.p_num
is NULL OR fm_document.p_num='') ";
@@ -199,6 +207,7 @@
$filtermethod .= " $where
fm_document.user_id='$filter' ";
}
+ $querymethod = '';
if($query)
{
$query = ereg_replace("'",'',$query);
@@ -207,7 +216,6 @@
$querymethod = " $where (fm_document.address
$this->like '%$query%' or fm_document.location_code $this->like '$query%')";
}
-
$sql .= " $filtermethod $querymethod $groupmethod";
//echo $sql;
@@ -216,6 +224,7 @@
$this->total_records = $this->db2->num_rows();
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+ $document_list = array();
$j=0;
while ($this->db->next_record())
{
Index: class.uidocument.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- class.uidocument.inc.php 5 Oct 2006 11:33:53 -0000 1.16
+++ class.uidocument.inc.php 6 Oct 2006 13:07:08 -0000 1.17
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage document
- * @version $Id: class.uidocument.inc.php,v 1.16 2006/10/05 11:33:53
sigurdne Exp $
+ * @version $Id: class.uidocument.inc.php,v 1.17 2006/10/06 13:07:08
sigurdne Exp $
*/
/**
@@ -100,10 +100,15 @@
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
-
$GLOBALS['phpgw']->xslttpl->add_file(array('document','values','table_header',
+ $GLOBALS['phpgw']->xslttpl->add_file(array(
+
'document',
+
'values',
+
'table_header',
'menu',
'nextmatchs',
-
'search_field'));
+
'search_field'
+
)
+ );
$entity_id = get_var('entity_id',array('POST','GET'));
$links = $this->menu->links('document_'.$entity_id);
@@ -257,7 +262,6 @@
'sort' => $this->sort,
'order' => $this->order,
'cat_id' => $this->cat_id,
- 'district_id' => $this->district_id,
'filter' => $this->filter,
'status_id' => $this->status_id,
'query' => $this->query,
@@ -293,16 +297,16 @@
'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'type'
=> $this->cat_id,
- 'district_list'
=> $this->bocommon->select_district_list('filter',$this->district_id),
- 'lang_no_district'
=> lang('no district'),
- 'lang_district_statustext'
=> lang('Select the district the selection belongs to. To do not use a district
select NO DISTRICT'),
- 'select_district_name'
=> 'district_id',
+// 'district_list'
=>
$this->bocommon->select_district_list('filter',$this->district_id),
+// 'lang_no_district'
=> lang('no district'),
+// 'lang_district_statustext'
=> lang('Select the district the selection belongs to. To do not use a
district select NO DISTRICT'),
+// 'select_district_name'
=> 'district_id',
'select_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
'lang_no_cat'
=> lang('no category'),
'lang_cat_statustext'
=> lang('Select the category. To do not use a category select NO CATEGORY'),
'select_name'
=> 'cat_id',
- 'cat_list'
=> $cat_list,
+ 'cat_list'
=> (isset($cat_list)?$cat_list:''),
'lang_no_doc_type'
=> lang('no document type'),
'lang_doc_type_statustext'
=> lang('Select the document type the document belongs to.'),
@@ -323,7 +327,7 @@
'query'
=> $this->query,
'lang_search'
=> lang('search'),
'table_header'
=> $table_header,
- 'values'
=> $content,
+ 'values'
=> (isset($content)?$content:''),
'table_add'
=> $table_add
);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.bocommon.inc.php class.sodoc...,
Sigurd Nes <=