[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.uirequest.inc.php,1.19,1.20 c
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.uirequest.inc.php,1.19,1.20 class.uiproject.inc.php,1.30,1.31 class.sorequest.inc.php,1.11,1.12 class.borequest.inc.php,1.5,1.6 |
Date: |
Sun, 22 Jun 2003 14:23:56 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv26397/inc
Modified Files:
class.uirequest.inc.php class.uiproject.inc.php
class.sorequest.inc.php class.borequest.inc.php
Log Message:
no message
Index: class.uirequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.uirequest.inc.php 19 Jun 2003 20:03:09 -0000 1.19
--- class.uirequest.inc.php 22 Jun 2003 18:23:53 -0000 1.20
***************
*** 35,41 ****
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
-
- $this->grants =
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
- $this->grants[$this->account] = PHPGW_ACL_READ +
PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE;
$this->bo =
CreateObject($this->currentapp.'.borequest',True);
$this->boproject =
CreateObject($this->currentapp.'.boproject');
--- 35,38 ----
***************
*** 43,46 ****
--- 40,50 ----
$this->config =
CreateObject('phpgwapi.config');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl_read =
$this->acl2->check('.project',1);
+ $this->acl_add =
$this->acl2->check('.project',2);
+ $this->acl_edit =
$this->acl2->check('.project',4);
+ $this->acl_delete =
$this->acl2->check('.project',8);
+ $this->acl_manage =
$this->acl2->check('.project',16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
***************
*** 72,76 ****
{
! $GLOBALS['phpgw']->xslttpl->add_file(array('request',
'menu',
'nextmatchs',
--- 76,80 ----
{
!
$GLOBALS['phpgw']->xslttpl->add_file(array('request','table_header',
'menu',
'nextmatchs',
***************
*** 78,81 ****
--- 82,90 ----
$project_id =
get_var('project_id',array('POST','GET')); // lookup for maintenance planning
+
+ if($project_id)
+ {
+ $lookup = True;
+ }
$links = $this->bocommon->menu();
***************
*** 84,191 ****
//_debug_array($request_list);
! while (is_array($request_list) && list(,$request) =
each($request_list))
{
! $location = split("-",
$request['location_code']);
! $content[] = array
! (
! 'title'
=> $request['title'],
! 'request_id'
=> $request['request_id'],
! 'descr'
=> $request['descr'],
! 'property_id'
=> $location[0],
! 'building_id'
=> $location[1],
! 'entrance_id'
=> $location[2],
! 'floor'
=> $request['floor'],
! 'apartment_id'
=> $location[3],
! 'address'
=> $request['address'],
! 'start_date'
=> $request['start_date'],
! 'coordinator'
=> $request['coordinator'],
! 'score'
=> $request['score'],
! 'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.view&id='
. $request['request_id']),
! 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.edit&id='
. $request['request_id']),
! 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.delete&request_id='
. $request['request_id']),
! 'lang_view_statustext' =>
lang('view the request'),
! 'lang_edit_statustext' =>
lang('edit the request'),
! 'lang_delete_statustext' =>
lang('delete this request'),
! 'text_view'
=> lang('view'),
! 'text_edit'
=> lang('edit'),
! 'text_delete'
=> lang('delete')
! );
! }
! $table_header[] = array
! (
! 'sort_request' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'id',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'cat_id'
=>$this->cat_id,
!
'district_id' =>
$this->district_id,
!
'filter'
=>$this->filter,
'project_id'
=>$project_id,
!
'query'
=>$this->query)
!
)),
! 'lang_request' => lang('request'),
! 'lang_title' => lang('Title'),
! 'sort_property' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'property_id',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'cat_id'
=>$this->cat_id,
!
'district_id' =>
$this->district_id,
!
'filter'
=>$this->filter,
'project_id'
=>$project_id,
!
'query'
=>$this->query)
!
)),
! 'lang_property' => lang('Property'),
! 'lang_building' => lang('Building'),
! 'lang_entrance' => lang('Entrance'),
! 'lang_floor' => lang('Floor'),
! 'lang_apartment' => lang('Apartment'),
! 'sort_address' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'address',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'cat_id'
=>$this->cat_id,
!
'district_id' =>
$this->district_id,
!
'filter'
=>$this->filter,
'project_id'
=>$project_id,
!
'query'
=>$this->query)
!
)),
! 'lang_address' => lang('Address'),
! 'lang_start_date' => lang('Start date'),
! 'lang_coordinator' => lang('Coordinator'),
! 'sort_score' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'score',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'cat_id'
=>$this->cat_id,
!
'district_id' =>
$this->district_id,
!
'filter'
=>$this->filter,
'project_id'
=>$project_id,
!
'query'
=>$this->query)
!
)),
! 'lang_score' => lang('score'),
! 'lang_view' => lang('view'),
! 'lang_edit' => lang('edit'),
! 'lang_delete' => lang('delete'),
! 'lang_select' => lang('Select')
! );
! $table_add[] = array
! (
! 'lang_add' =>
lang('add'),
! 'lang_add_statustext' => lang('add a
request'),
! 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.edit')
! );
$link_data = array
--- 93,283 ----
//_debug_array($request_list);
! $uicols = $this->bo->uicols;
! //_debug_array($uicols);
!
! $j=0;
! while (is_array($request_list) && list(,$request_entry)
= each($request_list))
{
! for ($k=0;$k<count($uicols['name']);$k++)
! {
! if($uicols['input_type'][$k]!='hidden')
! {
!
if($request_entry['query_location'][$uicols['name'][$k]])
! {
!
$content[$j]['row'][$k]['statustext'] = lang('search');
!
$content[$j]['row'][$k]['text'] =
$request_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['link'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.index&query='
. $request_entry['query_location'][$uicols['name'][$k]] . '&project_id=' .
$project_id);
! }
! else
! {
!
$content[$j]['row'][$k]['value'] =
$request_entry[$uicols['name'][$k]];
!
$content[$j]['row'][$k]['name'] = $uicols['name'][$k];
! }
+ }
! }
!
! if(!$lookup)
! {
! if($this->acl_read)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('view the
request');
! $content[$j]['row'][$k]['text']
= lang('view');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.view&id='
. $request_entry['request_id']);
! $k++;
! }
!
! if($this->acl_edit)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('edit the
request');
! $content[$j]['row'][$k]['text']
= lang('edit');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.edit&id='
. $request_entry['request_id']);
! $k++;
! }
!
! if($this->acl_delete)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('delete the
request');
! $content[$j]['row'][$k]['text']
= lang('delete');
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.delete&id='
. $request_entry['request_id']);
! $k++;
! }
!
! }
! else
! {
! if($this->acl_read)
! {
!
$content[$j]['row'][$k]['statustext'] = lang('view the
request');
! $content[$j]['row'][$k]['text']
= lang('view');
!
$content[$j]['row'][$k]['target'] = '_blank';
! $content[$j]['row'][$k]['link']
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.view&id='
. $request_entry['request_id']);
!
$content[$j]['row'][$k]['request_id'] =
$request_entry['request_id'];
! $k++;
! }
!
! }
!
! $j++;
! }
!
! for ($i=0;$i<count($uicols['descr']);$i++)
! {
! if($uicols['input_type'][$i]!='hidden')
! {
! $table_header[$i]['header'] =
$uicols['descr'][$i];
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! if($uicols['name'][$i]=='loc1')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'location_code',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
'project_id'
=>$project_id,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! if($uicols['name'][$i]=='request_id')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'request_id',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
'project_id'
=>$project_id,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! if($uicols['name'][$i]=='score')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'score',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
'project_id'
=>$project_id,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! if($uicols['name'][$i]=='street_name')
! {
! $table_header[$i]['sort_link']
=true;
! $table_header[$i]['sort']
= $this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
!
'var' => 'street_name',
'order' => $this->order,
!
'extra' => array('menuaction' =>
$this->currentapp.'.uirequest.index',
!
'type_id'
=>$type_id,
!
'query'
=>$this->query,
'project_id'
=>$project_id,
!
'district_id' =>
$this->district_id,
!
'cat_id'
=>$this->cat_id)
!
));
! }
! }
! }
! if($this->acl_read)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('view');
! $i++;
! }
!
! if(!$lookup)
! {
! if($this->acl_edit)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('edit');
! $i++;
! }
! if($this->acl_delete)
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header']
= lang('delete');
! $i++;
! }
! }
! else
! {
! $table_header[$i]['width']
= '5%';
! $table_header[$i]['align']
= 'center';
! $table_header[$i]['header'] =
lang('select');
! }
!
! //_debug_array($content);
! if($this->acl_add)
! {
! $table_add[] = array
! (
! 'lang_add'
=> lang('add'),
! 'lang_add_statustext' => lang('add a
request'),
! 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.edit')
! );
! }
$link_data = array
***************
*** 198,214 ****
'filter'
=>$this->filter,
'status_id'
=>$this->status_id,
! 'project_id'
=>$project_id,
'query'
=>$this->query
);
$data = array
(
'lang_priority_key'
=> lang('Priority key'),
'lang_priority_help'
=> lang('To alter the priority key'),
! 'link_priority_key'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.priority_key'),
'overlib_source'
=> './'.$this->currentapp.'/inc/overlib.js',
-
- 'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.index&project_id='
. $project_id),
- 'lang_history_statustext'
=> lang('search for history at this location'),
'lang_select'
=> lang('select'),
--- 290,309 ----
'filter'
=>$this->filter,
'status_id'
=>$this->status_id,
! 'project_id' =>$project_id,
'query'
=>$this->query
);
+
+ if($this->acl_manage)
+ {
+ $link_priority_key
=
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.priority_key');
+ }
+
$data = array
(
'lang_priority_key'
=> lang('Priority key'),
'lang_priority_help'
=> lang('To alter the priority key'),
! 'link_priority_key'
=> $link_priority_key,
'overlib_source'
=> './'.$this->currentapp.'/inc/overlib.js',
'lang_select'
=> lang('select'),
***************
*** 218,221 ****
--- 313,317 ----
'project_id'
=> $project_id,
+ 'lookup'
=> $lookup,
'links'
=> $links,
'allow_allrows'
=> false,
***************
*** 250,255 ****
'query'
=> $this->query,
'lang_search'
=> lang('search'),
! 'table_header_request' =>
$table_header,
! 'values_request'
=> $content,
'table_add'
=> $table_add
);
--- 346,351 ----
'query'
=> $this->query,
'lang_search'
=> lang('search'),
! 'table_header'
=> $table_header,
! 'values'
=> $content,
'table_add'
=> $table_add
);
***************
*** 266,269 ****
--- 362,369 ----
function priority_key()
{
+ if(!$this->acl_manage)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uirequest.index');
+ }
$GLOBALS['phpgw']->xslttpl->add_file(array('request'));
$GLOBALS['phpgw_info']['flags']['headonly']=true;
***************
*** 311,318 ****
-
-
function edit()
{
$id =
get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
--- 411,420 ----
function edit()
{
+ if(!$this->acl_add && !$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uirequest.index');
+ }
$id =
get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
***************
*** 703,707 ****
function delete()
{
! $request_id = get_var('request_id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
--- 805,814 ----
function delete()
{
! if(!$this->acl_delete)
! {
!
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uirequest.index');
! }
!
! $id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
***************
*** 713,717 ****
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($request_id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
--- 820,824 ----
if (get_var('confirm',array('POST')))
{
! $this->bo->delete($id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
***************
*** 722,726 ****
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.delete&request_id='
. $request_id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
--- 829,833 ----
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
! 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uirequest.delete&id='
. $id),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
***************
*** 739,742 ****
--- 846,853 ----
function view()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uirequest.index');
+ }
$id =
get_var('id',array('POST','GET'));
Index: class.uiproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.uiproject.inc.php 22 Jun 2003 11:10:44 -0000 1.30
--- class.uiproject.inc.php 22 Jun 2003 18:23:53 -0000 1.31
***************
*** 115,120 ****
if($lookup &&
$k==(count($uicols['name'])-2))
!
$content[$j]['row'][$k]['lookup_action'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&project_id='
. $project_entry['project_id']);
!
}
--- 115,121 ----
if($lookup &&
$k==(count($uicols['name'])-2))
! {
!
$content[$j]['row'][$k]['lookup_action'] =
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit&project_id='
. $project_entry['project_id']);
! }
}
***************
*** 264,269 ****
$data = array
(
- 'link_history'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.index&lookup='
. $lookup),
- 'lang_history_statustext' =>
lang('search for history at this location'),
'lang_select'
=> lang('select'),
'lookup_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiworkorder.edit'),
--- 265,268 ----
***************
*** 359,364 ****
{
$location_code =
get_var('location_code',array('POST','GET'));
! $values['tenant_id'] =
get_var('tenant_id',array('POST','GET'));
! $values['equipment_id'] =
get_var('equipment_id',array('POST','GET'));
$values['descr'] =
get_var('descr',array('POST','GET'));
$ticket_id
= get_var('ticket_id',array('POST','GET'));
--- 358,363 ----
{
$location_code =
get_var('location_code',array('POST','GET'));
! $tenant_id
= get_var('tenant_id',array('POST','GET'));
! $equipment_id =
get_var('equipment_id',array('POST','GET'));
$values['descr'] =
get_var('descr',array('POST','GET'));
$ticket_id
= get_var('ticket_id',array('POST','GET'));
***************
*** 379,383 ****
if($location_code)
{
! $values['location_data'] =
$this->bolocation->read_single($location_code);
}
--- 378,382 ----
if($location_code)
{
! $values['location_data'] =
$this->bolocation->read_single($location_code,array('tenant_id'=>$tenant_id,'equipment_id'=>$equipment_id));
}
Index: class.sorequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sorequest.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.sorequest.inc.php 21 Jun 2003 19:27:35 -0000 1.11
--- class.sorequest.inc.php 22 Jun 2003 18:23:53 -0000 1.12
***************
*** 20,23 ****
--- 20,24 ----
$this->soproject =
CreateObject($this->currentapp.'.soproject');
$this->historylog =
CreateObject($this->currentapp.'.historylog','request');
+ $this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->socommon =
CreateObject($this->currentapp.'.socommon');
***************
*** 181,184 ****
--- 182,228 ----
}
+ $entity_table = 'fm_request';
+
+ $cols .= $entity_table . '.location_code';
+ $cols_return[] = 'location_code';
+
+ $cols .= ",$entity_table.id as request_id";
+ $cols_return[] = 'request_id';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'request_id';
+ $uicols['descr'][] =
lang('Request');
+ $uicols['statustext'][] = lang('Request ID');
+
+ $cols.= ",$entity_table.entry_date";
+ $cols_return[] = 'entry_date';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'entry_date';
+ $uicols['descr'][] = lang('entry
date');
+ $uicols['statustext'][] = lang('Request entry
date');
+
+ $cols.= ",$entity_table.title as title";
+ $cols_return[] = 'title';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'title';
+ $uicols['descr'][] = lang('title');
+ $uicols['statustext'][] = lang('Request title');
+
+ $cols.= ",$entity_table.coordinator";
+ $cols_return[] = 'coordinator';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'coordinator';
+ $uicols['descr'][] =
lang('Coordinator');
+ $uicols['statustext'][] = lang('Project
coordinator');
+
+ $cols.= ",$entity_table.score";
+ $cols_return[] = 'score';
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] = 'score';
+ $uicols['descr'][] = lang('score');
+ $uicols['statustext'][] = lang('score');
+
+ $sql =
$this->bocommon->generate_sql(array('entity_table'=>$entity_table,'cols'=>$cols,'cols_return'=>$cols_return,
+
'uicols'=>$uicols,'joinmethod'=>$joinmethod,'paranthesis'=>$paranthesis,'query'=>$query));
+
if ($order)
{
***************
*** 223,227 ****
}
! $sql = "SELECT * FROM fm_request $filtermethod
$querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
--- 267,276 ----
}
! $sql .= " $filtermethod $querymethod";
!
! $this->uicols = $this->bocommon->uicols;
! $cols_return = $this->bocommon->cols_return;
! $type_id =
$this->bocommon->type_id;
! $this->cols_extra = $this->bocommon->cols_extra;
$this->db2->query($sql,__LINE__,__FILE__);
***************
*** 229,249 ****
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
while ($this->db->next_record())
{
! $ngrants =
(int)$this->grants[$this->db->f('fm_request.owner')];
! $request_list[] = array
! (
! 'request_id' => $this->db->f('id'),
! 'title' =>
stripslashes($this->db->f('title')),
! 'start_date' =>
$this->db->f('start_date'),
! 'coordinator' =>
$this->db->f('coordinator'),
! 'equipment_id' =>
$this->db->f('equipment_id'),
! 'location_code' =>
$this->db->f('location_code'),
! 'floor' =>
$this->db->f('floor'),
! 'address' =>
$this->db->f('address'),
! 'category' =>
$this->db->f('category'),
! 'score' =>
$this->db->f('score'),
! 'grants' => $ngrants
! );
}
//_debug_array($request_list);
--- 278,299 ----
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
+
+ $j=0;
while ($this->db->next_record())
{
! for ($i=0;$i<count($cols_return);$i++)
! {
! $request_list[$j][$cols_return[$i]] =
$this->db->f($cols_return[$i]);
! }
!
! $location_code= $this->db->f('location_code');
! $location = split('-',$location_code);
! for ($m=0;$m<count($location);$m++)
! {
! $request_list[$j]['loc' . ($m+1)] =
$location[$m];
!
$request_list[$j]['query_location']['loc' . ($m+1)]=implode("-",
array_slice($location, 0, ($m+1)));
! }
!
! $j++;
}
//_debug_array($request_list);
Index: class.borequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.borequest.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.borequest.inc.php 19 Jun 2003 20:03:10 -0000 1.5
--- class.borequest.inc.php 22 Jun 2003 18:23:53 -0000 1.6
***************
*** 29,34 ****
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.sorequest');
- $this->socommon =
CreateObject($this->currentapp.'.socommon');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->historylog =
CreateObject($this->currentapp.'.historylog','request');
$this->contacts =
CreateObject('phpgwapi.contacts');
--- 29,34 ----
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.sorequest');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->solocation =
CreateObject($this->currentapp.'.solocation');
$this->historylog =
CreateObject($this->currentapp.'.historylog','request');
$this->contacts =
CreateObject('phpgwapi.contacts');
***************
*** 377,380 ****
--- 377,383 ----
$this->total_records = $this->so->total_records;
+ $this->uicols = $this->so->uicols;
+ $cols_extra = $this->so->cols_extra;
+
$dateformat =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
***************
*** 382,386 ****
{
$request[$i]['coordinator'] =
$GLOBALS['phpgw']->accounts->id2name($request[$i]['coordinator']);
! $request[$i]['start_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['start_date'],$dateformat);
}
--- 385,395 ----
{
$request[$i]['coordinator'] =
$GLOBALS['phpgw']->accounts->id2name($request[$i]['coordinator']);
! $request[$i]['entry_date'] =
$GLOBALS['phpgw']->common->show_date($request[$i]['entry_date'],$dateformat);
!
$location_data=$this->solocation->read_single($request[$i]['location_code']);
!
! for ($j=0;$j<count($cols_extra);$j++)
! {
! $request[$i][$cols_extra[$j]] =
$location_data[$cols_extra[$j]];
! }
}
***************
*** 397,401 ****
if($request['tenant_id'])
{
!
$tenant_data=$this->socommon->read_single_tenant($request['tenant_id']);
$request['contact_phone']=
$tenant_data['contact_phone'];
$request['tenant_name']=
$tenant_data['last_name'] . ', ' . $tenant_data['first_name'];
--- 406,410 ----
if($request['tenant_id'])
{
!
$tenant_data=$this->bocommon->read_single_tenant($request['tenant_id']);
$request['contact_phone']=
$tenant_data['contact_phone'];
$request['tenant_name']=
$tenant_data['last_name'] . ', ' . $tenant_data['first_name'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.uirequest.inc.php,1.19,1.20 class.uiproject.inc.php,1.30,1.31 class.sorequest.inc.php,1.11,1.12 class.borequest.inc.php,1.5,1.6,
Sigurd Nes <address@hidden> <=