[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.sotts2.inc.php class.uitts.i...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.sotts2.inc.php class.uitts.i... |
Date: |
Fri, 03 Mar 2006 17:48:04 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/03/03 17:48:04
Modified files:
inc : class.sotts2.inc.php class.uitts.inc.php
class.botts.inc.php class.uiadmin.inc.php
class.soadmin_custom.inc.php
class.uiadmin_custom.inc.php
class.boadmin_custom.inc.php
Log message:
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sotts2.inc.php.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uitts.inc.php.diff?tr1=1.29&tr2=1.30&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.botts.inc.php.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uiadmin.inc.php.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soadmin_custom.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.uiadmin_custom.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.boadmin_custom.inc.php.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: property/inc/class.boadmin_custom.inc.php
diff -u property/inc/class.boadmin_custom.inc.php:1.1
property/inc/class.boadmin_custom.inc.php:1.2
--- property/inc/class.boadmin_custom.inc.php:1.1 Fri Mar 3 13:00:18 2006
+++ property/inc/class.boadmin_custom.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.boadmin_custom.inc.php,v 1.1 2006/03/03 13:00:18
sigurdne Exp $
+ * @version $Id: class.boadmin_custom.inc.php,v 1.2 2006/03/03 17:48:03
sigurdne Exp $
*/
/**
@@ -24,7 +24,6 @@
var $sort;
var $order;
var $cat_id;
- var $entity_id;
var $public_functions = array
(
@@ -73,7 +72,6 @@
$filter = get_var('filter',array('POST','GET'));
$cat_id = get_var('cat_id',array('POST','GET'));
$allrows =
get_var('allrows',array('POST','GET'));
- $entity_id =
get_var('entity_id',array('POST','GET'));
if ($start)
{
@@ -104,10 +102,6 @@
{
$this->cat_id = $cat_id;
}
- if(isset($entity_id))
- {
- $this->entity_id = $entity_id;
- }
if(isset($allrows))
{
$this->allrows = $allrows;
@@ -131,28 +125,22 @@
$this->start = $data['start'];
$this->query = $data['query'];
$this->filter = $data['filter'];
- $this->sort = $data['sort'];
+ $this->sort = $data['sort'];
$this->order = $data['order'];
$this->cat_id = $data['cat_id'];
- $this->entity_id = $data['entity_id'];
$this->allrows = $data['allrows'];
}
- function read($entity_id='',$cat_id='',$allrows='',
$acl_location='')
+ function read($allrows='')
{
if($allrows)
{
$this->allrows = $allrows;
}
- if (!$acl_location && $entity_id && $cat_id)
- {
- $acl_location = '.entity.' . $entity_id . '.' .
$cat_id;
- }
-
$custom_function = $this->so->read(array('start' =>
$this->start,'query' => $this->query,'sort' => $this->sort,'order' =>
$this->order,
-
'acl_location' => $acl_location,'allrows'=>$this->allrows));
+
'acl_location' => $this->cat_id,'allrows'=>$this->allrows));
$this->total_records = $this->so->total_records;
@@ -161,7 +149,7 @@
function resort_custom_function($id,$resort)
{
-
$this->so->resort_custom_function(array('resort'=>$resort,'entity_id' =>
$this->entity_id,'cat_id' => $this->cat_id,'id'=>$id));
+
$this->so->resort_custom_function(array('resort'=>$resort,'acl_location' =>
$this->cat_id,'id'=>$id));
}
function save_custom_function($custom_function,$action='')
@@ -224,19 +212,15 @@
return $file_list;
}
- function
read_single_custom_function($entity_id='',$cat_id='',$id,$acl_location='')
+
+ function read_single_custom_function($id)
{
- if (!$acl_location && $entity_id && $cat_id)
- {
- $acl_location = '.entity.' . $entity_id . '.' .
$cat_id;
- }
- return
$this->so->read_single_custom_function($acl_location,$id);
+ return
$this->so->read_single_custom_function($id,$this->cat_id);
}
- function delete($acl_location,$custom_function_id)
+ function delete($id)
{
-
$this->so->delete_custom_function($acl_location,$custom_function_id);
+ $this->so->delete_custom_function($id,$this->cat_id);
}
-
}
?>
Index: property/inc/class.botts.inc.php
diff -u property/inc/class.botts.inc.php:1.18
property/inc/class.botts.inc.php:1.19
--- property/inc/class.botts.inc.php:1.18 Wed Mar 1 19:30:04 2006
+++ property/inc/class.botts.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage helpdesk
- * @version $Id: class.botts.inc.php,v 1.18 2006/03/01 19:30:04 sigurdne
Exp $
+ * @version $Id: class.botts.inc.php,v 1.19 2006/03/03 17:48:03 sigurdne
Exp $
*/
/**
@@ -24,13 +24,14 @@
var $sort;
var $order;
var $cat_id;
+ var $acl_location;
var $public_functions = array
(
- 'read' => True,
+ 'read' => True,
'read_single' => True,
- 'save' => True,
- 'delete' => True,
+ 'save' => True,
+ 'delete' => True,
'check_perms' => True
);
@@ -593,6 +594,19 @@
$receipt =
$this->mail_ticket($receipt['id'],$fields_updated,$receipt,$ticket['location_code']);
}
+
+ $soadmin_custom =
CreateObject($this->currentapp.'.soadmin_custom');
+ $custom_functions =
$soadmin_custom->read(array('acl_location' =>
$this->acl_location,'allrows'=>True));
+
+ if (isSet($custom_functions) AND
is_array($custom_functions))
+ {
+ foreach($custom_functions as $entry)
+ {
+ if (is_file(PHPGW_APP_INC . SEP .
'custom' . SEP . $entry['file_name']) && $entry['active'])
+ include (PHPGW_APP_INC . SEP . 'custom'
. SEP . $entry['file_name']);
+ }
+ }
+
return $receipt;
}
Index: property/inc/class.soadmin_custom.inc.php
diff -u property/inc/class.soadmin_custom.inc.php:1.1
property/inc/class.soadmin_custom.inc.php:1.2
--- property/inc/class.soadmin_custom.inc.php:1.1 Fri Mar 3 13:00:18 2006
+++ property/inc/class.soadmin_custom.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.soadmin_custom.inc.php,v 1.1 2006/03/03 13:00:18
sigurdne Exp $
+ * @version $Id: class.soadmin_custom.inc.php,v 1.2 2006/03/03 17:48:03
sigurdne Exp $
*/
/**
@@ -18,7 +18,6 @@
class soadmin_custom
{
- var $grants;
function soadmin_custom()
{
@@ -29,10 +28,8 @@
$this->db2 = $this->bocommon->new_db();
$this->join = $this->bocommon->join;
$this->like = $this->bocommon->like;
-
}
-
function read($data)
{
if(is_array($data))
@@ -63,17 +60,25 @@
}
$table = 'fm_custom_function';
+ $where = 'WHERE';
+
+ if($acl_location)
+ {
+
+ $filtermethod = " WHERE
acl_location='$acl_location'";
+ $where = 'AND';
+ }
if($query)
{
$query = ereg_replace("'",'',$query);
$query = ereg_replace('"','',$query);
- $querymethod = " AND name $this->like
'%$query%' or descr $this->like '%$query%'";
+ $querymethod = " $where file_name $this->like
'%$query%' or descr $this->like '%$query%'";
}
- // $sql = "SELECT * FROM $table WHERE
acl_location='$acl_location' $querymethod";
- $sql = "SELECT * FROM $table ";
+
+ $sql = "SELECT * FROM $table $filtermethod
$querymethod";
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
@@ -91,7 +96,8 @@
{
$custom_function[] = array
(
- 'id' => $this->db->f('id'),
+ 'id' => $this->db->f('id'),
+ 'acl_location' =>
$this->db->f('acl_location'),
'file_name' =>
$this->db->f('file_name'),
'sorting' =>
$this->db->f('custom_sort'),
'descr' =>
$this->db->f('descr'),
@@ -102,7 +108,7 @@
}
- function read_single_custom_function($acl_location,$id)
+ function read_single_custom_function($id,$acl_location)
{
$sql = "SELECT * FROM fm_custom_function where
acl_location='$acl_location' AND id=$id";
@@ -123,20 +129,13 @@
function add_custom_function($custom_function)
{
- if(!$custom_function['acl_location'] &&
$custom_function['entity_id'] && $custom_function['cat_id'])
- {
- $acl_location = '.entity.' .
$custom_function['entity_id'] . '.' . $custom_function['cat_id'];
- }
- else
- {
- $acl_location =
$custom_function['acl_location'];
- }
-
- if(!$acl_location)
+ if(!$custom_function['acl_location'])
{
return $receipt['error'][] = array('msg' =>
lang('acl_locastion is missing'));
}
+ $acl_location = $custom_function['acl_location'];
+
$custom_function['descr'] =
$this->db->db_addslashes($custom_function['descr']);
@@ -174,14 +173,7 @@
function edit_custom_function($custom_function)
{
- if(!$custom_function['acl_location'] &&
$custom_function['entity_id'] && $custom_function['cat_id'])
- {
- $acl_location = '.entity.' .
$custom_function['entity_id'] . '.' . $custom_function['cat_id'];
- }
- else
- {
- $acl_location =
$custom_function['acl_location'];
- }
+ $acl_location = $custom_function['acl_location'];
if(!$acl_location)
{
@@ -214,21 +206,10 @@
if(is_array($data))
{
$resort =
(isset($data['resort'])?$data['resort']:'up');
- $entity_id =
(isset($data['entity_id'])?$data['entity_id']:'');
- $cat_id =
(isset($data['cat_id'])?$data['cat_id']:'');
$acl_location =
(isset($data['acl_location'])?$data['acl_location']:'');
$id = (isset($data['id'])?$data['id']:'');
}
- if(!$acl_location && $entity_id && $cat_id)
- {
- $acl_location = '.entity.' . $entity_id . '.' .
$cat_id;
- }
- else
- {
- $acl_location = $acl_location;
- }
-
if(!$acl_location)
{
return $receipt['error'][] = array('msg' =>
lang('acl_locastion is missing'));
@@ -269,9 +250,9 @@
}
}
- function
delete_custom_function($acl_location,$custom_function_id)
+ function delete_custom_function($id,$acl_location)
{
- $sql = "SELECT custom_sort FROM fm_custom_function
where acl_location='$acl_location' AND id=$custom_function_id";
+ $sql = "SELECT custom_sort FROM fm_custom_function
where acl_location='$acl_location' AND id=$id";
$this->db->query($sql,__LINE__,__FILE__);
$this->db->next_record();
$custom_sort = $this->db->f('custom_sort');
@@ -284,7 +265,7 @@
$sql = "UPDATE fm_custom_function set
custom_sort=custom_sort-1 WHERE acl_location='$acl_location' AND custom_sort >
$custom_sort";
$this->db->query($sql,__LINE__,__FILE__);
}
- $this->db->query("DELETE FROM fm_custom_function WHERE
acl_location='$acl_location' AND id=$custom_function_id",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM fm_custom_function WHERE
acl_location='$acl_location' AND id=$id",__LINE__,__FILE__);
}
}
?>
Index: property/inc/class.sotts2.inc.php
diff -u property/inc/class.sotts2.inc.php:1.10
property/inc/class.sotts2.inc.php:1.11
--- property/inc/class.sotts2.inc.php:1.10 Mon Jan 30 22:14:19 2006
+++ property/inc/class.sotts2.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage helpdesk
- * @version $Id: class.sotts2.inc.php,v 1.10 2006/01/30 22:14:19
sigurdne Exp $
+ * @version $Id: class.sotts2.inc.php,v 1.11 2006/03/03 17:48:03
sigurdne Exp $
*/
/**
@@ -18,6 +18,8 @@
class sotts2
{
+ var $acl_location;
+
function sotts2()
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
@@ -271,6 +273,19 @@
}
$receipt['message'][]= array('msg' =>
lang('Ticket has been updated'));
+
+ $soadmin_custom =
CreateObject($this->currentapp.'.soadmin_custom');
+ $custom_functions =
$soadmin_custom->read(array('acl_location' =>
$this->acl_location,'allrows'=>True));
+
+ if (isSet($custom_functions) AND
is_array($custom_functions))
+ {
+ foreach($custom_functions as $entry)
+ {
+ if (is_file(PHPGW_APP_INC . SEP
. 'custom' . SEP . $entry['file_name']) && $entry['active'])
+ include (PHPGW_APP_INC . SEP .
'custom' . SEP . $entry['file_name']);
+ }
+ }
+
}
return $receipt;
Index: property/inc/class.uiadmin.inc.php
diff -u property/inc/class.uiadmin.inc.php:1.11
property/inc/class.uiadmin.inc.php:1.12
--- property/inc/class.uiadmin.inc.php:1.11 Fri Feb 3 12:05:49 2006
+++ property/inc/class.uiadmin.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uiadmin.inc.php,v 1.11 2006/02/03 12:05:49
sigurdne Exp $
+ * @version $Id: class.uiadmin.inc.php,v 1.12 2006/03/03 17:48:03
sigurdne Exp $
*/
/**
@@ -45,7 +45,7 @@
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->bo =
CreateObject($this->currentapp.'.boadmin',true);
+ $this->bo =
CreateObject($this->currentapp.'.boadmin',true);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->start =
$this->bo->start;
Index: property/inc/class.uiadmin_custom.inc.php
diff -u property/inc/class.uiadmin_custom.inc.php:1.1
property/inc/class.uiadmin_custom.inc.php:1.2
--- property/inc/class.uiadmin_custom.inc.php:1.1 Fri Mar 3 13:00:18 2006
+++ property/inc/class.uiadmin_custom.inc.php Fri Mar 3 17:48:03 2006
@@ -10,7 +10,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.uiadmin_custom.inc.php,v 1.1 2006/03/03 13:00:18
sigurdne Exp $
+ * @version $Id: class.uiadmin_custom.inc.php,v 1.2 2006/03/03 17:48:03
sigurdne Exp $
*/
/**
@@ -42,6 +42,7 @@
$this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bo =
CreateObject($this->currentapp.'.boadmin_custom',True);
+ $this->boadmin =
CreateObject($this->currentapp.'.boadmin',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
@@ -49,7 +50,6 @@
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
$this->order =
$this->bo->order;
- $this->entity_id =
$this->bo->entity_id;
$this->cat_id =
$this->bo->cat_id;
$this->allrows =
$this->bo->allrows;
@@ -65,7 +65,6 @@
'sort' => $this->sort,
'order' => $this->order,
'allrows' => $this->allrows,
- 'entity_id' => $this->entity_id,
'cat_id' => $this->cat_id
);
$this->bo->save_sessiondata($data);
@@ -95,22 +94,23 @@
{
$content[] = array
(
+ 'acl_location'
=> $entry['acl_location'],
'file_name'
=> $entry['file_name'],
'descr'
=> $entry['descr'],
'sorting'
=> $entry['sorting'],
'active'
=> $entry['active']?'X':'',
- 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=up&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_down'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=down&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.delete&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&custom_function_id=' . $entry['id']),
+ 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=up&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
+ 'link_down'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&resort=down&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id'] . '&allrows=' .
$this->allrows),
+ 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id']),
+ 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.delete&cat_id='
. $entry['acl_location'] . '&id=' . $entry['id']),
'lang_up_text'
=> lang('shift up'),
'lang_down_text'
=> lang('shift down'),
'lang_edit_text'
=> lang('edit the custom_function'),
'lang_delete_text'
=> lang('delete the custom_function'),
'text_custom_function'
=> lang('custom_functions'),
- 'text_up'
=> lang('up'),
- 'text_down'
=> lang('down'),
- 'text_edit'
=> lang('edit'),
+ 'text_up'
=> lang('up'),
+ 'text_down'
=> lang('down'),
+ 'text_edit'
=> lang('edit'),
'text_delete'
=> lang('delete')
);
}
@@ -118,20 +118,30 @@
$table_header[] = array
(
+ 'lang_acl_location' => lang('Location'),
'lang_descr' => lang('Descr'),
'lang_active' => lang('Active'),
'lang_sorting' => lang('sorting'),
'lang_search' => lang('search'),
- 'lang_edit' => lang('edit'),
+ 'lang_edit' => lang('edit'),
'lang_delete' => lang('delete'),
+ 'sort_acl_location' =>
$this->nextmatchs->show_sort_order(array
+
(
+
'sort' => $this->sort,
+
'var' => 'acl_location',
+
'order' => $this->order,
+
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
+
'cat_id' =>$this->cat_id,
+
'allrows'=>$this->allrows)
+
)),
+
'sort_name' =>
$this->nextmatchs->show_sort_order(array
(
'sort' => $this->sort,
'var' => 'column_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
-
'entity_id'
=>$entity_id,
-
'cat_id'
=>$cat_id,
+
'cat_id' =>$this->cat_id,
'allrows'=>$this->allrows)
)),
'sort_sorting' =>
$this->nextmatchs->show_sort_order(array
@@ -140,8 +150,7 @@
'var' => 'custom_function_sort',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
-
'entity_id'
=>$entity_id,
-
'cat_id'
=>$cat_id,
+
'cat_id' =>$this->cat_id,
'allrows'=>$this->allrows)
)),
'lang_name' => lang('Name'),
@@ -149,12 +158,12 @@
$table_add[] = array
(
- 'lang_add' =>
lang('add'),
+ 'lang_add' => lang('add'),
'lang_add_custom_functiontext' => lang('add a
custom_function'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&entity_id='.$entity_id
. '&cat_id=' . $cat_id),
- 'lang_done' =>
lang('done'),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.edit&cat_id='
. $this->cat_id),
+ 'lang_done' => lang('done'),
'lang_done_custom_functiontext' => lang('back
to admin'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.category&entity_id='.$entity_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php'),
);
if(!$this->allrows)
@@ -172,8 +181,7 @@
'sort'
=>$this->sort,
'order'
=>$this->order,
'query'
=>$this->query,
- 'entity_id'
=>$entity_id,
- 'cat_id'
=>$cat_id
+ 'cat_id'
=>$this->cat_id
);
@@ -184,21 +192,26 @@
'lang_category'
=> lang('category'),
'category_name'
=> $category['name'],
'allow_allrows'
=> True,
- 'allrows'
=> $this->allrows,
+ 'allrows'
=> $this->allrows,
'start_record'
=> $this->start,
'record_limit'
=> $record_limit,
'start_record'
=> $this->start,
'num_records'
=> count($custom_function_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
- 'lang_searchfield_custom_functiontext' =>
lang('Enter the search string. To show all entries, empty this field and press
the SUBMIT button again'),
- 'lang_searchbutton_custom_functiontext' =>
lang('Submit the search string'),
- 'query'
=> $this->query,
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
+ 'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
+ 'lang_searchfield_custom_functiontext'
=> lang('Enter the search string. To show all entries, empty this field and
press the SUBMIT button again'),
+ 'lang_searchbutton_custom_functiontext'
=> lang('Submit the search string'),
+ 'query'
=> $this->query,
'lang_search'
=> lang('search'),
'table_header_custom_function'
=> $table_header,
- 'values_custom_function'
=> $content,
- 'table_add'
=> $table_add
+ 'values_custom_function'
=> $content,
+ 'table_add'
=> $table_add,
+
+ 'lang_no_location'
=> lang('No location'),
+ 'lang_location_statustext'
=> lang('Select submodule'),
+ 'select_name_location'
=> 'cat_id',
+ 'location_list'
=> $this->boadmin->select_location('filter',$this->cat_id,False)
);
$appname
= lang('custom function');
@@ -211,9 +224,7 @@
function edit()
{
- $entity_id =
get_var('entity_id',array('POST','GET'));
- $cat_id = get_var('cat_id',array('POST','GET'));
- $id =
get_var('id',array('POST','GET'));
+ $id = get_var('id',array('POST','GET'));
$values = get_var('values',array('POST'));
$GLOBALS['phpgw']->xslttpl->add_file(array('admin_custom'));
@@ -226,13 +237,11 @@
$action='edit';
}
- $values['entity_id']=$entity_id;
- $values['cat_id']=$cat_id;
+ $values['acl_location'] = $this->cat_id;
-
- if (!$values['entity_id'])
+ if (!$values['acl_location'])
{
- $receipt['error'][] =
array('msg'=>lang('entity type not choosen!'));
+ $receipt['error'][] =
array('msg'=>lang('location not choosen!'));
}
if (!$values['custom_function_file'])
@@ -260,7 +269,7 @@
if ($id)
{
- $values =
$this->bo->read_single_custom_function($entity_id,$cat_id,$id);
+ $values =
$this->bo->read_single_custom_function($id);
$type_name=$values['type_name'];
$function_msg = lang('edit custom function'). '
' . lang($type_name);
$action='edit';
@@ -274,54 +283,53 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_custom.edit',
- 'entity_id' => $entity_id,
- 'cat_id' => $cat_id,
+ 'cat_id' => $this->cat_id,
'id' => $id
);
//_debug_array($values);
- $entity = $this->bo->read_single($entity_id,false);
- $category =
$this->bo->read_single_category($entity_id,$cat_id);
-
$msgbox_data = $this->bocommon->msgbox_data($receipt);
$data = array
(
- 'lang_custom'
=> lang('entity'),
- 'entity_name'
=> $entity['name'],
- 'lang_category'
=> lang('category'),
- 'category_name'
=> $category['name'],
+ 'lang_custom' =>
lang('custom'),
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&entity_id='.$entity_id
. '&cat_id='.$cat_id),
- 'lang_id'
=> lang('Custom function ID'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_custom.index&cat_id='.$this->cat_id),
+ 'lang_id' =>
lang('Custom function ID'),
'lang_custom_type' =>
lang('Entity type'),
- 'lang_no_custom_type' => lang('No
entity type'),
- 'lang_save'
=> lang('save'),
- 'lang_done'
=> lang('done'),
- 'value_id'
=> $id,
-
- 'lang_descr' =>
lang('descr'),
- 'lang_descr_custom_functiontext'=> lang('Enter
a descr for the custom function'),
- 'value_descr' =>
$values['descr'],
+ 'lang_no_custom_type' =>
lang('No entity type'),
+ 'lang_save' =>
lang('save'),
+ 'lang_done' =>
lang('done'),
+ 'value_id' => $id,
+
+ 'lang_descr' =>
lang('descr'),
+ 'lang_descr_custom_functiontext' =>
lang('Enter a descr for the custom function'),
+ 'value_descr' =>
$values['descr'],
'lang_done_custom_functiontext' =>
lang('Back to the list'),
'lang_save_custom_functiontext' =>
lang('Save the custom function'),
- 'lang_custom_function'
=> lang('custom function'),
+ 'lang_custom_function' =>
lang('custom function'),
'lang_custom_function_statustext' =>
lang('Select a custom_function'),
- 'lang_no_custom_function'
=> lang('No custom function'),
- 'custom_function_list'
=> $this->bo->select_custom_function($values['custom_function_file']),
+ 'lang_no_custom_function' =>
lang('No custom function'),
+ 'custom_function_list' =>
$this->bo->select_custom_function($values['custom_function_file']),
+
+ 'lang_location' =>
lang('Location'),
+ 'lang_no_location' =>
lang('No location'),
+ 'lang_location_statustext' =>
lang('Select submodule'),
+ 'select_name_location' =>
'cat_id',
+ 'location_list' =>
$this->boadmin->select_location('select',$this->cat_id),
- 'value_active' =>
$values['active'],
+ 'value_active' =>
$values['active'],
'lang_active' =>
lang('Active'),
- 'lang_active_statustext' => lang('check
acivate custom function'),
+ 'lang_active_statustext' =>
lang('check acivate custom function'),
'value_search' =>
$values['search'],
- 'lang_include_search' =>
lang('Include in search'),
- 'lang_include_search_statustext'=> lang('check
to show this custom function in location list')
+ 'lang_include_search' =>
lang('Include in search'),
+ 'lang_include_search_statustext' =>
lang('check to show this custom function in location list')
);
$appname
= lang('entity');
@@ -332,30 +340,26 @@
function delete()
{
- $acl_location =
get_var('acl_location',array('POST','GET'));
- $custom_function_id =
get_var('custom_function_id',array('POST','GET'));
+ $id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
- $function='index';
-
-
$link_data = array
(
- 'menuaction' =>
$this->currentapp.'.uiadmin_custom.'.$function,
- 'custom_function_id' => $custom_function_id,
- 'acl_location' => $acl_location
+ 'menuaction' =>
$this->currentapp.'.uiadmin_custom.index',
+ 'id' => $id,
+ 'cat_id' => $this->cat_id
);
$delete_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_custom.delete',
- 'acl_location' => $acl_location,
- 'custom_function_id' => $custom_function_id
+ 'cat_id' => $this->cat_id,
+ 'id' => $id
);
if (get_var('confirm',array('POST')))
{
-
$this->bo->delete($acl_location,$custom_function_id);
+ $this->bo->delete($id);
Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php',$link_data));
}
Index: property/inc/class.uitts.inc.php
diff -u property/inc/class.uitts.inc.php:1.29
property/inc/class.uitts.inc.php:1.30
--- property/inc/class.uitts.inc.php:1.29 Fri Feb 3 12:05:49 2006
+++ property/inc/class.uitts.inc.php Fri Mar 3 17:48:03 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage helpdesk
- * @version $Id: class.uitts.inc.php,v 1.29 2006/02/03 12:05:49 sigurdne
Exp $
+ * @version $Id: class.uitts.inc.php,v 1.30 2006/03/03 17:48:03 sigurdne
Exp $
*/
/**
@@ -39,12 +39,13 @@
$this->menu =
CreateObject($this->currentapp.'.menu');
$this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.ticket';
+ $this->acl2_location = '.ticket';
$this->acl_read =
$this->acl2->check('.ticket',1);
$this->acl_add =
$this->acl2->check('.ticket',2);
$this->acl_edit =
$this->acl2->check('.ticket',4);
$this->acl_delete =
$this->acl2->check('.ticket',8);
$this->acl_manage =
$this->acl2->check('.ticket',16);
+ $this->bo->acl_location =
$this->acl2_location;
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -800,6 +801,7 @@
}
$so2 =
CreateObject($this->currentapp.'.sotts2');
+ $so2->acl_location = $this->acl2_location;
$receipt = $so2->update_ticket($values,$id);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.sotts2.inc.php class.uitts.i...,
Sigurd Nes <=