[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.soadmin_location.inc.php inc...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.soadmin_location.inc.php inc... |
Date: |
Thu, 14 Sep 2006 13:53:52 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/09/14 13:53:52
Modified files:
inc : class.soadmin_location.inc.php
class.uiadmin.inc.php
class.uiadmin_entity.inc.php
class.uiadmin_location.inc.php
class.uiasync.inc.php class.uicategory.inc.php
class.uip_of_town.inc.php
class.uistandard_2.inc.php
class.uistandard_3.inc.php
setup : default_records.inc.php setup.inc.php
tables_update.inc.php
Log message:
link
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_location.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_location.inc.php?cvsroot=phpgroupware&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiasync.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uicategory.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uip_of_town.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uistandard_2.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uistandard_3.inc.php?cvsroot=phpgroupware&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/property/setup/default_records.inc.php?cvsroot=phpgroupware&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/property/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/property/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.49&r2=1.50
Patches:
Index: inc/class.soadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_location.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- inc/class.soadmin_location.inc.php 6 Sep 2006 07:18:36 -0000 1.22
+++ inc/class.soadmin_location.inc.php 14 Sep 2006 13:53:52 -0000 1.23
@@ -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_location.inc.php,v 1.22 2006/09/06
07:18:36 sigurdne Exp $
+ * @version $Id: class.soadmin_location.inc.php,v 1.23 2006/09/14
13:53:52 sigurdne Exp $
*/
/**
@@ -121,7 +121,7 @@
$order =
(isset($data['order'])?$data['order']:'');
}
- if (isset($order))
+ if ($order)
{
$ordermethod = " order by $order $sort";
@@ -144,6 +144,7 @@
$this->db2->query($sql,__LINE__,__FILE__);
$this->total_records = $this->db2->num_rows();
+
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
while ($this->db->next_record())
Index: inc/class.uiadmin.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uiadmin.inc.php 17 Apr 2006 11:36:05 -0000 1.14
+++ inc/class.uiadmin.inc.php 14 Sep 2006 13:53:52 -0000 1.15
@@ -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.14 2006/04/17 11:36:05
sigurdne Exp $
+ * @version $Id: class.uiadmin.inc.php,v 1.15 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -48,6 +48,14 @@
$this->bo =
CreateObject($this->currentapp.'.boadmin',true);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -188,11 +196,11 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin.aclprefs',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->filter,
- 'query'
=>$this->query,
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'cat_id' => $this->cat_id,
+ 'filter' => $this->filter,
+ 'query' => $this->query,
'module'
=> $this->location,
'granting_group' =>
$this->granting_group
);
@@ -219,7 +227,7 @@
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($user_list)+count($group_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin.aclprefs'),
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin.aclprefs')),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_groups'
=> lang('groups'),
@@ -400,10 +408,10 @@
'var' => 'account_lid',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
-
'cat_id'
=>$this->cat_id,
-
'query'
=>$this->query,
+
'cat_id' => $this->cat_id,
+
'query' => $this->query,
'module'
=> $this->location,
-
'submodule_id'
=>$this->submodule_id)
+
'submodule_id' => $this->submodule_id)
)),
'sort_lastname' =>
$this->nextmatchs->show_sort_order(array
(
@@ -411,10 +419,10 @@
'var' => 'account_lastname',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
-
'cat_id'
=>$this->cat_id,
-
'query'
=>$this->query,
+
'cat_id' => $this->cat_id,
+
'query' => $this->query,
'module'
=> $this->location,
-
'submodule_id'
=>$this->submodule_id)
+
'submodule_id' => $this->submodule_id)
)),
'sort_firstname' =>
$this->nextmatchs->show_sort_order(array
(
@@ -422,10 +430,10 @@
'var' => 'account_firstname',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
-
'cat_id'
=>$this->cat_id,
-
'query'
=>$this->query,
+
'cat_id' => $this->cat_id,
+
'query' => $this->query,
'module'
=> $this->location,
-
'submodule_id'
=>$this->submodule_id)
+
'submodule_id' => $this->submodule_id)
)),
@@ -444,11 +452,11 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'cat_id'
=>$this->cat_id,
- 'filter'
=>$this->filter,
- 'query'
=>$this->query,
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'cat_id' => $this->cat_id,
+ 'filter' => $this->filter,
+ 'query' => $this->query,
'module' =>
$this->location
);
@@ -564,7 +572,7 @@
$data = array
(
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'form_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin.edit_id'),
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin.edit_id')),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php'),
'lang_submit' =>
lang('submit'),
'lang_save' =>
lang('Edit'),
@@ -637,7 +645,7 @@
$data = array
(
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
- 'form_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin.contact_info'),
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin.contact_info')),
'done_action'
=> $GLOBALS['phpgw']->link('/admin/index.php'),
'lang_submit'
=> lang('submit'),
'lang_save'
=> lang('Edit'),
@@ -667,7 +675,7 @@
'value_old_default_vendor_category' =>
$prefs['default_vendor_category'],
'vendor_category'
=> $cat_data['cat_list'],
'select_user_name'
=> 'approval_from',
- 'lang_default_vendor_category_statustext'
=> lang('Select default vendor category'),
+ 'lang_default_vendor_category_statustext'=>
lang('Select default vendor category'),
'lang_no_cat'
=> lang('No category'),
Index: inc/class.uiadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.uiadmin_entity.inc.php 17 Jun 2006 08:45:56 -0000 1.20
+++ inc/class.uiadmin_entity.inc.php 14 Sep 2006 13:53:52 -0000 1.21
@@ -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_entity.inc.php,v 1.20 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uiadmin_entity.inc.php,v 1.21 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -40,7 +40,7 @@
'delete' => True,
'list_attribute' => True,
'edit_attrib' => True,
- 'list_custom_function'=>True,
+ 'list_custom_function' =>True,
'edit_custom_function' => True
);
@@ -54,6 +54,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location =
'.admin.entity';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -82,6 +90,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$this->bo->reset_fm_cache();
$GLOBALS['phpgw']->xslttpl->add_file(array(
'admin_entity',
@@ -101,9 +114,9 @@
'id'
=> $entry['id'],
'name'
=> $entry['name'],
'descr'
=> $entry['descr'],
- 'link_categories'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.category&entity_id='
. $entry['id']),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit&id='
. $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.delete&entity_id='
. $entry['id']),
+ 'link_categories'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.category',' entity_id'=> $entry['id'])),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit', 'id'=> $entry['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.delete',' entity_id'=> $entry['id'])),
'lang_view_standardtext'
=> lang('view the standard'),
'lang_category_text'
=> lang('categories for the entity type'),
'lang_edit_standardtext'
=> lang('edit the entity'),
@@ -130,7 +143,7 @@
'var' => 'id',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_entity.index',
-
'allrows'=>$this->allrows)
+
'allrows'=> $this->allrows)
)),
'lang_id' => lang('entity id'),
'sort_name' =>
$this->nextmatchs->show_sort_order(array
@@ -139,7 +152,7 @@
'var' => 'name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_entity.index',
-
'allrows'=>$this->allrows)
+
'allrows'=> $this->allrows)
)),
'lang_name' => lang('Name'),
);
@@ -148,9 +161,9 @@
(
'lang_add' =>
lang('add'),
'lang_add_standardtext' => lang('add a
standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit'),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit')),
'lang_done' =>
lang('done'),
- 'lang_done_standardtext' => lang('back
to admin'),
+ 'lang_done_standardtext'=> lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
);
@@ -202,6 +215,11 @@
function list_status()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl2_location));
+ }
+
$this->bo->reset_fm_cache();
$GLOBALS['phpgw']->xslttpl->add_file(array(
'admin_entity',
@@ -220,8 +238,8 @@
(
'id'
=> $entry['id'],
'descr'
=> $entry['descr'],
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_status&entity_id='
. $this->entity_id . '&cat_id=' . $this->cat_id . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.delete&entity_id='
. $this->entity_id . '&cat_id=' . $this->cat_id . '&status_id=' .
$entry['id']),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_status', 'entity_id'=>
$this->entity_id, 'cat_id'=> $this->cat_id, 'id'=> $entry['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.delete', 'entity_id'=> $this->entity_id,
'cat_id'=> $this->cat_id, 'status_id'=> $entry['id'])),
'lang_edit_standardtext'
=> lang('edit the entity'),
'lang_delete_standardtext'
=> lang('delete the entity'),
'text_edit'
=> lang('edit'),
@@ -255,10 +273,10 @@
(
'lang_add' =>
lang('add'),
'lang_add_text' => lang('add a standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_status&entity_id='
. $this->entity_id . '&cat_id=' . $this->cat_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_status', 'entity_id'=>
$this->entity_id, 'cat_id'=> $this->cat_id)),
'lang_done' =>
lang('done'),
'lang_done_text' => lang('back to
admin'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.category&entity_id='
. $this->entity_id . '&cat_id=' . $this->cat_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.category', 'entity_id'=> $this->entity_id,
'cat_id'=> $this->cat_id)),
);
if(!$this->allrows)
@@ -273,11 +291,11 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_entity.list_status',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'entity_id'
=>$this->entity_id,
- 'cat_id'
=>$this->cat_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'entity_id' => $this->entity_id,
+ 'cat_id' => $this->cat_id
);
$entity =
$this->bo->read_single($this->entity_id,false);
@@ -320,6 +338,10 @@
function category()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl2_location));
+ }
$entity_id =
get_var('entity_id',array('POST','GET'));
@@ -342,11 +364,11 @@
'name'
=> $entry['name'],
'prefix'
=> $entry['prefix'],
'descr'
=> $entry['descr'],
-// 'link_status'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_status&cat_id='
. $entry['id'] . '&entity_id=' . $entity_id),
- 'link_custom_function'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_custom_function&cat_id='
. $entry['id'] . '&entity_id=' . $entity_id),
- 'link_attribute'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_attribute&cat_id='
. $entry['id'] . '&entity_id=' . $entity_id),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_category&id='
. $entry['id'] . '&entity_id=' . $entity_id),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.delete&cat_id='
. $entry['id'] . '&entity_id=' . $entity_id),
+// 'link_status'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_status', 'cat_id'=> $entry['id'],
'entity_id'=> $entity_id)),
+ 'link_custom_function'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_custom_function', 'cat_id'=>
$entry['id'], 'entity_id'=> $entity_id)),
+ 'link_attribute'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_attribute', 'cat_id'=> $entry['id'],
'entity_id'=> $entity_id)),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_category','id'=> $entry['id'],
'entity_id'=> $entity_id)),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.delete', 'cat_id'=> $entry['id'],
'entity_id'=> $entity_id)),
'lang_view_standardtext'
=> lang('view the category'),
'lang_status_standardtext'
=> lang('Status for the entity category'),
'lang_attribute_standardtext'
=> lang('attributes for the entity category'),
@@ -400,10 +422,10 @@
(
'lang_add' =>
lang('add'),
'lang_add_standardtext' => lang('add a
category'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_category&entity_id='
. $entity_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_category', 'entity_id'=> $entity_id)),
'lang_done' =>
lang('done'),
'lang_done_standardtext' => lang('back
to entity'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.index')
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.index'))
);
$entity = $this->bo->read_single($entity_id,false);
@@ -420,10 +442,10 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_entity.category',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'entity_id'
=>$entity_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'entity_id' => $entity_id
);
$data = array
@@ -459,6 +481,11 @@
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
$config =
CreateObject('phpgwapi.config',$this->currentapp);
@@ -544,7 +571,7 @@
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
'lang_name_standardtext' =>
lang('Enter a name of the standard'),
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.index'),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.index')),
'lang_id'
=> lang('standard ID'),
'lang_name'
=> lang('Name'),
'lang_descr'
=> lang('Descr'),
@@ -585,6 +612,11 @@
function edit_status()
{
+ if(!$this->acl_edit)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 4, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -654,7 +686,7 @@
'msgbox_data'
=> $GLOBALS['phpgw']->common->msgbox($msgbox_data),
'lang_name_standardtext' =>
lang('Enter a name of the standard'),
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_status&entity_id='
. $this->entity_id . '&cat_id=' . $this->cat_id),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_status', 'entity_id'=>
$this->entity_id, 'cat_id'=> $this->cat_id)),
'lang_id'
=> lang('status ID'),
'lang_descr'
=> lang('Descr'),
'lang_save'
=> lang('save'),
@@ -676,6 +708,11 @@
function edit_category()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$entity_id =
get_var('entity_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -750,7 +787,7 @@
'lang_name_standardtext' =>
lang('Enter a name of the standard'),
'form_action'
=> $GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.category&entity_id='
. $entity_id),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.category', 'entity_id'=> $entity_id)),
'lang_id'
=> lang('Category'),
'lang_name'
=> lang('Name'),
'lang_descr'
=> lang('Descr'),
@@ -796,6 +833,11 @@
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$entity_id =
get_var('entity_id',array('POST','GET'));
$cat_id = get_var('cat_id',array('POST','GET'));
$attrib_id =
get_var('attrib_id',array('POST','GET'));
@@ -889,6 +931,11 @@
function list_attribute()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl2_location));
+ }
+
$entity_id = $this->entity_id;
$cat_id = $this->cat_id;
$id = get_var('id',array('POST','GET'));
@@ -918,10 +965,10 @@
'input_text'
=> $entry['input_text'],
'sorting'
=> $entry['attrib_sort'],
'search'
=> $entry['search'],
- 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_attribute&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_entity.list_attribute&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_entity.edit_attrib&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.delete&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&attrib_id=' . $entry['id']),
+ 'link_up'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_attribute', 'resort'=> 'up',
'entity_id'=> $entity_id, 'cat_id'=> $cat_id, 'id'=> $entry['id'], 'allrows'=>
$this->allrows)),
+ 'link_down'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_attribute', 'resort'=> 'down',
'entity_id'=> $entity_id, 'cat_id'=> $cat_id, 'id'=> $entry['id'], 'allrows'=>
$this->allrows)),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_attrib', 'entity_id'=> $entity_id,
'cat_id'=> $cat_id, 'id'=> $entry['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.delete', 'entity_id'=> $entity_id,
'cat_id'=> $cat_id, 'attrib_id'=> $entry['id'])),
'lang_up_text'
=> lang('shift up'),
'lang_down_text'
=> lang('shift down'),
'lang_edit_text'
=> lang('edit the attrib'),
@@ -972,10 +1019,10 @@
(
'lang_add' =>
lang('add'),
'lang_add_attribtext' => lang('add an
attrib'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_attrib&entity_id='.$entity_id
. '&cat_id=' . $cat_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_attrib', 'entity_id'=> $entity_id,
'cat_id'=> $cat_id)),
'lang_done' =>
lang('done'),
'lang_done_attribtext' => lang('back to
admin'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.category&entity_id='.$entity_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.category', 'entity_id'=> $entity_id)),
);
if(!$this->allrows)
@@ -990,11 +1037,11 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_entity.list_attribute',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'entity_id'
=>$entity_id,
- 'cat_id'
=>$cat_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'entity_id' => $entity_id,
+ 'cat_id' => $cat_id
);
$entity = $this->bo->read_single($entity_id,false);
@@ -1035,6 +1082,11 @@
function edit_attrib()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$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'));
@@ -1163,11 +1215,11 @@
'value_choice' =>
$values['choice'],
'lang_delete_value' =>
lang('Delete value'),
'lang_value' =>
lang('value'),
- 'lang_delete_choice_statustext'=> lang('Delete
this value from the list of multiple choice'),
+ 'lang_delete_choice_statustext'
=> lang('Delete this value from the list of multiple choice'),
'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_entity.list_attribute&entity_id='.$entity_id
. '&cat_id='.$cat_id),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_attribute', 'entity_id'=> $entity_id,
'cat_id'=> $cat_id)),
'lang_id'
=> lang('Attribute ID'),
'lang_entity_type' =>
lang('Entity type'),
'lang_no_entity_type' => lang('No
entity type'),
@@ -1187,7 +1239,7 @@
'lang_entity_statustext' => lang('Select
a entity type'),
'lang_statustext' =>
lang('Statustext'),
- 'lang_statustext_attribtext'=> lang('Enter a
statustext for the inputfield in forms'),
+ 'lang_statustext_attribtext'
=> lang('Enter a statustext for the inputfield in forms'),
'value_statustext' =>
$values['statustext'],
'lang_done_attribtext' => lang('Back
to the list'),
@@ -1222,11 +1274,11 @@
'lang_list_statustext' =>
lang('check to show this attribute in entity list'),
'value_search' =>
$values['search'],
'lang_include_search' =>
lang('Include in search'),
- 'lang_include_search_statustext'=> lang('check
to show this attribute in location list'),
+ 'lang_include_search_statustext'
=> lang('check to show this attribute in location list'),
'value_history' =>
$values['history'],
'lang_history' => lang('history'),
- 'lang_history_statustext'=> lang('Enable
history for this attribute'),
+ 'lang_history_statustext'
=> lang('Enable history for this attribute'),
);
//_debug_array($values);
@@ -1239,6 +1291,11 @@
function list_custom_function()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl2_location));
+ }
+
$entity_id = $this->entity_id;
$cat_id = $this->cat_id;
$id = get_var('id',array('POST','GET'));
@@ -1266,10 +1323,10 @@
'descr'
=> $entry['descr'],
'sorting'
=> $entry['sorting'],
'active'
=> $entry['active']?'X':'',
- 'link_up'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_custom_function&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_entity.list_custom_function&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_entity.edit_custom_function&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.delete&entity_id='
. $entity_id . '&cat_id=' . $cat_id . '&custom_function_id=' . $entry['id']),
+ 'link_up'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_custom_function', 'resort'=>'up',
'entity_id'=> $entity_id, 'cat_id'=> $cat_id, 'id'=> $entry['id'], 'allrows'=>
$this->allrows)),
+ 'link_down'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_custom_function', 'resort'=>'down',
'entity_id'=> $entity_id, 'cat_id'=> $cat_id, 'id'=> $entry['id'], 'allrows'=>
$this->allrows)),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_custom_function', 'entity_id'=>
$entity_id, 'cat_id'=> $cat_id, 'id'=> $entry['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.delete', 'entity_id'=> $entity_id,
'cat_id'=> $cat_id, 'custom_function_id'=> $entry['id'])),
'lang_up_text'
=> lang('shift up'),
'lang_down_text'
=> lang('shift down'),
'lang_edit_text'
=> lang('edit the custom_function'),
@@ -1297,9 +1354,9 @@
'var' => 'column_name',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_entity.list_custom_function',
-
'entity_id'
=>$entity_id,
-
'cat_id'
=>$cat_id,
-
'allrows'=>$this->allrows)
+
'entity_id' => $entity_id,
+
'cat_id' => $cat_id,
+
'allrows' =>
$this->allrows)
)),
'sort_sorting' =>
$this->nextmatchs->show_sort_order(array
(
@@ -1309,7 +1366,7 @@
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_entity.list_custom_function',
'entity_id'
=>$entity_id,
'cat_id'
=>$cat_id,
-
'allrows'=>$this->allrows)
+
'allrows'
=>$this->allrows)
)),
'lang_name' => lang('Name'),
);
@@ -1318,10 +1375,10 @@
(
'lang_add' =>
lang('add'),
'lang_add_custom_functiontext' => lang('add a
custom_function'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_custom_function&entity_id='.$entity_id
. '&cat_id=' . $cat_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.edit_custom_function', 'entity_id'=>
$entity_id, 'cat_id'=> $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_entity.category&entity_id='.$entity_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.category', 'entity_id'=> $entity_id)),
);
if(!$this->allrows)
@@ -1336,11 +1393,11 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_entity.list_custom_function',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'entity_id'
=>$entity_id,
- 'cat_id'
=>$cat_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'entity_id' => $entity_id,
+ 'cat_id' => $cat_id
);
$entity = $this->bo->read_single($entity_id,false);
@@ -1381,6 +1438,11 @@
function edit_custom_function()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$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'));
@@ -1466,7 +1528,7 @@
'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_entity.list_custom_function&entity_id='.$entity_id
. '&cat_id='.$cat_id),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_entity.list_custom_function', 'entity_id'=>
$entity_id, 'cat_id'=> $cat_id)),
'lang_id'
=> lang('Custom function ID'),
'lang_entity_type' =>
lang('Entity type'),
'lang_no_entity_type' => lang('No
entity type'),
@@ -1475,7 +1537,7 @@
'value_id'
=> $id,
'lang_descr' =>
lang('descr'),
- 'lang_descr_custom_functiontext'=> lang('Enter
a descr for the custom function'),
+ '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'),
@@ -1496,6 +1558,5 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_custom_function' =>
$data));
}
-
}
?>
Index: inc/class.uiadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- inc/class.uiadmin_location.inc.php 6 Sep 2006 07:18:36 -0000 1.16
+++ inc/class.uiadmin_location.inc.php 14 Sep 2006 13:53:52 -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 admin
- * @version $Id: class.uiadmin_location.inc.php,v 1.16 2006/09/06
07:18:36 sigurdne Exp $
+ * @version $Id: class.uiadmin_location.inc.php,v 1.17 2006/09/14
13:53:52 sigurdne Exp $
*/
/**
@@ -48,6 +48,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location =
'.admin.location';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -71,6 +79,10 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
$this->bo->reset_fm_cache();
$GLOBALS['phpgw']->xslttpl->add_file(array(
@@ -90,10 +102,10 @@
'name' =>
$standard['name'],
'prefix' =>
$standard['prefix'],
'first' =>
$standard['descr'],
- 'link_categories' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.index&type=location&type_id='
. $standard['id']),
- 'link_attribute' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.list_attribute&type_id='
. $standard['id']),
- 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit&id='
. $standard['id']),
- 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.delete&id='
. $standard['id']),
+ 'link_categories' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.index', 'type'=>'location', 'type_id'=>
$standard['id'])),
+ 'link_attribute' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.list_attribute', 'type_id'=>
$standard['id'])),
+ 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit' ,'id'=> $standard['id'])),
+ 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.delete' ,'id'=> $standard['id'])),
'lang_view_standardtext' =>
lang('view the standard'),
'lang_category_text' =>
lang('categories for the location type'),
'lang_attribute_standardtext' =>
lang('attributes for the location type'),
@@ -139,7 +151,7 @@
(
'lang_add' => lang('add'),
'lang_add_standardtext' => lang('add a
standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit'),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit')),
'lang_done' => lang('done'),
'lang_done_standardtext'=> lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
@@ -154,7 +166,7 @@
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($standard_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.index'),
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.index')),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_standardtext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_standardtext' =>
lang('Submit the search string'),
@@ -176,6 +188,11 @@
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -240,7 +257,7 @@
'lang_name_standardtext' =>
lang('Enter a name of the standard'),
'form_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.index'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.index')),
'lang_id' =>
lang('standard ID'),
'lang_name' =>
lang('Name'),
'lang_descr' =>
lang('Descr'),
@@ -266,6 +283,11 @@
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$attrib = get_var('attrib',array('POST','GET'));
$type_id =
get_var('type_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
@@ -296,7 +318,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.delete&id='
. $id.'&attrib='.$attrib.'&type_id='.$type_id),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.delete', 'id'=> $id, 'attrib'=> $attrib,
'type_id'=> $type_id)),
'lang_confirm_msg' => lang('do you really
want to delete this entry'),
'lang_yes' => lang('yes'),
'lang_yes_standardtext' => lang('Delete the
entry'),
@@ -315,6 +337,11 @@
function list_attribute()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl2_location));
+ }
+
$type_id =
get_var('type_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$resort = get_var('resort',array('POST','GET'));
@@ -341,10 +368,10 @@
'column_name' =>
$attrib['column_name'],
'input_text' =>
$attrib['input_text'],
'sorting' =>
$attrib['attrib_sort'],
- 'link_up' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.list_attribute&resort=up&id='
. $attrib['id'].'&type_id='.$type_id . '&allrows=' . $this->allrows),
- 'link_down' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.list_attribute&resort=down&id='
. $attrib['id'].'&type_id='.$type_id . '&allrows=' . $this->allrows),
- 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit_attrib&id='
. $attrib['id'].'&type_id='.$type_id),
- 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.delete&id='
. $attrib['id'].'&type_id='.$type_id.'&attrib=true'),
+ 'link_up' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.list_attribute', 'resort'=> 'up', 'id'=>
$attrib['id'], 'type_id'=> $type_id, 'allrows'=> $this->allrows)),
+ 'link_down' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.list_attribute', 'resort'=> 'down', 'id'=>
$attrib['id'], 'type_id'=> $type_id, 'allrows'=> $this->allrows)),
+ 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit_attrib', 'id'=> $attrib['id'],
'type_id'=> $type_id)),
+ 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.delete', 'id'=> $attrib['id'], 'type_id'=>
$type_id, 'attrib'=>true)),
'lang_view_attribtext' =>
lang('view the attrib'),
'lang_attribute_attribtext' =>
lang('attributes for the attrib'). ' ' . lang('location'),
'lang_edit_attribtext' =>
lang('edit the attrib'),
@@ -373,8 +400,8 @@
'var' => 'attrib_sort',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_location.list_attribute',
-
'type_id' =>$type_id,
-
'allrows'=>$this->allrows)
+
'type_id' => $type_id,
+
'allrows' => $this->allrows)
)),
'sort_name' =>
$this->nextmatchs->show_sort_order(array
@@ -384,7 +411,7 @@
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin_location.list_attribute',
'type_id' =>$type_id,
-
'allrows'=>$this->allrows)
+
'allrows'
=>$this->allrows)
)),
'lang_name' => lang('Name'),
);
@@ -393,10 +420,10 @@
(
'lang_add' =>
lang('add'),
'lang_add_attribtext' => lang('add an
attrib'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit_attrib&type_id='.$type_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit_attrib', 'type_id'=> $type_id)),
'lang_done' =>
lang('done'),
'lang_done_attribtext' => lang('back to
admin'),
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.index'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.index')),
);
if(!$this->allrows)
@@ -411,10 +438,10 @@
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uiadmin_location.list_attribute',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'query'
=>$this->query,
- 'type_id'
=>$type_id
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'query' => $this->query,
+ 'type_id' => $type_id
);
$data = array
@@ -447,6 +474,11 @@
function edit_attrib()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$type_id =
get_var('type_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$values = get_var('values',array('POST'));
@@ -564,11 +596,11 @@
'value_choice' =>
$values['choice'],
'lang_delete_value' =>
lang('Delete value'),
'lang_value' =>
lang('value'),
- 'lang_delete_choice_statustext'=> lang('Delete
this value from the list of multiple choice'),
+ 'lang_delete_choice_statustext' =>
lang('Delete this value from the list of multiple choice'),
'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_location.list_attribute&type_id='.$type_id),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.list_attribute', 'type_id'=> $type_id)),
'lang_id' =>
lang('Attribute ID'),
'lang_location_type' =>
lang('Type'),
'lang_no_location_type' => lang('No
entity type'),
@@ -588,7 +620,7 @@
'lang_entity_statustext' => lang('Select
a entity type'),
'lang_statustext' =>
lang('Statustext'),
- 'lang_statustext_attribtext'=> lang('Enter a
statustext for the inputfield in forms'),
+ 'lang_statustext_attribtext' =>
lang('Enter a statustext for the inputfield in forms'),
'value_statustext' =>
$values['statustext'],
'lang_done_attribtext' => lang('Back
to the list'),
@@ -636,6 +668,11 @@
function config()
{
+ if(!$this->acl_manage)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 16, 'acl_location'=>
$this->acl2_location));
+ }
+
$GLOBALS['phpgw']->xslttpl->add_file(array(
'admin_location',
'nextmatchs',
@@ -652,7 +689,7 @@
'column_name'
=> $standard['column_name'],
'name'
=> $standard['location_name'],
'prefix'
=> $standard['prefix'],
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit_config&column_name='
. $standard['column_name']),
+ 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit_config', 'column_name'=>
$standard['column_name'])),
'lang_edit_standardtext' =>
lang('edit the column relation'),
'text_edit'
=> lang('edit')
);
@@ -688,9 +725,9 @@
(
'lang_add' =>
lang('add'),
'lang_add_standardtext' => lang('add a
standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.edit'),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.edit')),
'lang_done' =>
lang('done'),
- 'lang_done_standardtext' => lang('back
to admin'),
+ 'lang_done_standardtext'=> lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
);
@@ -703,7 +740,7 @@
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($standard_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_location.index'),
+ 'link_url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.index')),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_standardtext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_standardtext' =>
lang('Submit the search string'),
@@ -725,6 +762,11 @@
function edit_config()
{
+ if(!$this->acl_manage)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 16, 'acl_location'=>
$this->acl2_location));
+ }
+
$column_name =
get_var('column_name',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -758,7 +800,7 @@
'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_location.config'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiadmin_location.config')),
'lang_column_name'
=> lang('Column name'),
'lang_save'
=> lang('save'),
@@ -782,7 +824,5 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit_config' => $data));
// $GLOBALS['phpgw']->xslttpl->pp();
}
-
-
}
?>
Index: inc/class.uiasync.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiasync.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.uiasync.inc.php 17 Jun 2006 08:45:56 -0000 1.12
+++ inc/class.uiasync.inc.php 14 Sep 2006 13:53:52 -0000 1.13
@@ -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.uiasync.inc.php,v 1.12 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uiasync.inc.php,v 1.13 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -65,8 +65,7 @@
function index()
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('async','nextmatchs',
-
'search_field'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('async','nextmatchs','search_field'));
$method_list = $this->bo->read();
@@ -88,11 +87,12 @@
'name'
=> $method['name'],
'first'
=> $method['descr'],
'data'
=> @implode (',',$method_data),
- 'link_run'
=> $GLOBALS['phpgw']->link('/index.php','menuaction='.$method['name'] .
'&' . @implode ('&',$method_data)),
- 'link_schedule'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uialarm.edit&method_id='
. $method['id']),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiasync.edit&id='
. $method['id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiasync.delete&id='
. $method['id']),
- 'lang_schedule_statustext'=>
lang('schedule the method'),
+ // FIX THIS !!
+ //'link_run'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> $method['name'] .
'&' . @implode ('&',$method_data)),
+ 'link_schedule'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uialarm.edit', 'method_id'=> $method['id'])),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.edit', 'id'=> $method['id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.delete', 'id'=> $method['id'])),
+ 'lang_schedule_statustext'
=> lang('schedule the method'),
'lang_run_statustext' => lang('Run
the method now'),
'lang_view_statustext' => lang('view
the method'),
'lang_edit_statustext' => lang('edit
the method'),
@@ -138,7 +138,7 @@
(
'lang_add' =>
lang('add'),
'lang_add_statustext' => lang('add a method'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiasync.edit'),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.edit')),
'lang_done' =>
lang('done'),
'lang_done_statustext' => lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
@@ -152,7 +152,7 @@
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($method_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiasync.index'),
+ 'link_url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.index')),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_statustext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_statustext' => lang('Submit
the search string'),
@@ -246,7 +246,7 @@
(
'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.'.uiasync.index'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.index')),
'lang_id'
=> lang('method ID'),
'lang_name'
=> lang('Name'),
'lang_descr'
=> lang('Descr'),
@@ -294,7 +294,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiasync.delete&id='
. $id),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uiasync.delete', 'id'=> $id)),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_statustext' => lang('Delete the
entry'),
Index: inc/class.uicategory.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uicategory.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uicategory.inc.php 17 Jun 2006 08:45:56 -0000 1.11
+++ inc/class.uicategory.inc.php 14 Sep 2006 13:53:52 -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 admin
- * @version $Id: class.uicategory.inc.php,v 1.11 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uicategory.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -43,11 +43,20 @@
$this->bo =
CreateObject($this->currentapp.'.bocategory',true);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
$this->order =
$this->bo->order;
$this->allrows =
$this->bo->allrows;
+
}
function save_sessiondata()
@@ -65,6 +74,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$type_id =
get_var('type_id',array('POST','GET'));
@@ -82,8 +96,8 @@
(
'id'
=> $category['id'],
'first'
=> $first,
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.edit&id='
. $category['id'].'&type='.$type . '&type_id=' . $type_id),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.delete&id='
. $category['id'].'&type='.$type . '&type_id=' . $type_id),
+ 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.edit', 'id'=> $category['id'], 'type'=> $type,
'type_id'=> $type_id)),
+ 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.delete', 'id'=> $category['id'], 'type'=> $type,
'type_id'=> $type_id)),
'lang_view_categorytext' =>
lang('view the category'),
'lang_edit_categorytext' =>
lang('edit the category'),
'lang_delete_categorytext' =>
lang('delete the category'),
@@ -107,7 +121,7 @@
'var' => 'id',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uicategory.index',
-
'type' =>$type,
+
'type' => $type,
'type_id' => $type_id)
)),
'lang_id' => lang('category id'),
@@ -117,9 +131,9 @@
(
'lang_add' =>
lang('add'),
'lang_add_categorytext' => lang('add a
category'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.edit&type='.$type
. '&type_id=' . $type_id),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.edit', 'type'=> $type, 'type_id'=> $type_id)),
'lang_done' =>
lang('done'),
- 'lang_done_categorytext' => lang('back
to admin'),
+ 'lang_done_categorytext'=> lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
);
@@ -141,7 +155,7 @@
'record_limit'
=> $record_limit,
'num_records'
=> count($category_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.index&type='.$type
. '&type_id=' . $type_id),
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.index', 'type'=> $type, 'type_id'=> $type_id)),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_categorytext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_categorytext' =>
lang('Submit the search string'),
@@ -158,12 +172,16 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
$this->save_sessiondata();
}
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$type_id =
get_var('type_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
@@ -224,7 +242,7 @@
(
'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.'.uicategory.index&type='.$type
. '&type_id=' . $type_id),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.index', 'type'=> $type, 'type_id'=> $type_id)),
'lang_id' =>
lang('category ID'),
'lang_descr'
=> lang('Descr'),
'lang_save'
=> lang('save'),
@@ -242,11 +260,15 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$type_id =
get_var('type_id',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
@@ -270,7 +292,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uicategory.delete&id='
. $id.'&type='.$type . '&type_id=' . $type_id),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uicategory.delete', 'id'=> $id, 'type'=> $type, 'type_id'=>
$type_id)),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_categorytext' => lang('Delete the
entry'),
@@ -283,8 +305,6 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
-
}
?>
Index: inc/class.uip_of_town.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uip_of_town.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uip_of_town.inc.php 10 Mar 2006 14:40:11 -0000 1.11
+++ inc/class.uip_of_town.inc.php 14 Sep 2006 13:53:52 -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 admin
- * @version $Id: class.uip_of_town.inc.php,v 1.11 2006/03/10 14:40:11
sigurdne Exp $
+ * @version $Id: class.uip_of_town.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -45,6 +45,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start = $this->bo->start;
$this->query = $this->bo->query;
$this->sort = $this->bo->sort;
@@ -71,6 +79,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$GLOBALS['phpgw']->xslttpl->add_file(array('p_of_town',
'menu',
'receipt',
@@ -93,9 +106,9 @@
'part_of_town_id'
=> $p_of_town['part_of_town_id'],
'name'
=> $p_of_town['name'],
'category'
=> $p_of_town['category'],
- 'link_view'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.view&part_of_town_id='
. $p_of_town['part_of_town_id']),
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.edit&part_of_town_id='
. $p_of_town['part_of_town_id']),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.delete&part_of_town_id='
. $p_of_town['part_of_town_id']),
+ 'link_view'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.view', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.edit', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.delete', 'part_of_town_id'=>
$p_of_town['part_of_town_id'])),
'lang_view_statustext'
=> lang('view the part of town'),
'lang_edit_statustext'
=> lang('edit the part of town'),
'lang_delete_statustext'
=> lang('delete the part of town'),
@@ -121,8 +134,8 @@
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uip_of_town.index',
'district_id' =>
$this->district_id,
-
'query'
=>$this->query,
-
'allrows'
=>$this->allrows)
+
'query' =>
$this->query,
+
'allrows' =>
$this->allrows)
)),
'sort_part_of_town_id' =>
$this->nextmatchs->show_sort_order(array
(
@@ -131,8 +144,8 @@
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uip_of_town.index',
'district_id' =>
$this->district_id,
-
'query'
=>$this->query,
-
'allrows'
=>$this->allrows)
+
'query' =>
$this->query,
+
'allrows' =>
$this->allrows)
)),
'sort_category' =>
$this->nextmatchs->show_sort_order(array
(
@@ -140,9 +153,9 @@
'var' => 'descr',
'order' => $this->order,
'extra' => array('menuaction' =>
$this->currentapp.'.uip_of_town.index',
-
'district_id'
=>$this->district_id,
-
'query'
=>$this->query,
-
'allrows'
=>$this->allrows)
+
'district_id' =>
$this->district_id,
+
'query' =>
$this->query,
+
'allrows' =>
$this->allrows)
)),
'lang_category' => lang('category')
);
@@ -151,17 +164,17 @@
(
'lang_add' =>
lang('add'),
'lang_add_statustext' => lang('add a part of
town'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.edit')
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.edit'))
);
$link_data = array
(
'menuaction' =>
$this->currentapp.'.uip_of_town.index',
- 'sort'
=>$this->sort,
- 'order'
=>$this->order,
- 'district_id'
=>$this->district_id,
- 'filter'
=>$this->filter,
- 'query'
=>$this->query
+ 'sort' => $this->sort,
+ 'order' => $this->order,
+ 'district_id' => $this->district_id,
+ 'filter' => $this->filter,
+ 'query' => $this->query
);
if(!$this->allrows)
@@ -206,12 +219,16 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('part of town') . ': ' . lang('list part of town');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$part_of_town_id =
get_var('part_of_town_id',array('POST','GET'));
$values = get_var('values',array('POST'));
@@ -244,14 +261,14 @@
if ($values['save'])
{
$GLOBALS['phpgw']->session->appsession('session_data','p_of_town_receipt',$receipt);
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.index');
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.index'));
}
}
}
if ($values['cancel'])
{
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.index');
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.index'));
}
@@ -292,14 +309,17 @@
'district_list'
=> $this->bocommon->select_district_list('select',$this->district_id)
);
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('part of town') . ': ' . ($part_of_town_id?lang('edit part og
town'):lang('add part of town'));
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$part_of_town_id =
get_var('part_of_town_id',array('POST','GET'));
$delete = get_var('delete',array('POST'));
$confirm = get_var('confirm',array('POST'));
@@ -320,7 +340,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.delete&part_of_town_id='
. $part_of_town_id),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.delete', 'part_of_town_id'=> $part_of_town_id)),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_statustext' => lang('Delete the
entry'),
@@ -338,6 +358,11 @@
function view()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$part_of_town_id =
get_var('part_of_town_id',array('GET'));
$action = get_var('action',array('GET'));
@@ -348,7 +373,7 @@
$p_of_town = $this->bo->read_single($part_of_town_id);
$data = array
(
- 'done_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uip_of_town.index'),
+ 'done_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uip_of_town.index')),
'lang_id' => lang('ID'),
'lang_name' => lang('name'),
'lang_district' => lang('District'),
@@ -360,7 +385,6 @@
);
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
- // $GLOBALS['phpgw']->xslttpl->pp();
}
}
?>
Index: inc/class.uistandard_2.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uistandard_2.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uistandard_2.inc.php 17 Jun 2006 08:45:56 -0000 1.11
+++ inc/class.uistandard_2.inc.php 14 Sep 2006 13:53:52 -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 admin
- * @version $Id: class.uistandard_2.inc.php,v 1.11 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uistandard_2.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -43,6 +43,14 @@
$this->bo =
CreateObject($this->currentapp.'.bostandard_2',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -65,6 +73,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_2','nextmatchs',
@@ -81,8 +94,8 @@
(
'id'
=> $standard['id'],
'first'
=> $first,
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_2.edit&id='
. $standard['id'].'&type='.$type),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_2.delete&id='
. $standard['id'].'&type='.$type),
+ 'link_edit'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.edit', 'id'=> $standard['id'], 'type'=>
$type)),
+ 'link_delete'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.delete', 'id'=> $standard['id'], 'type'=>
$type)),
'lang_view_standardtext' =>
lang('view the standard'),
'lang_edit_standardtext' =>
lang('edit the standard'),
'lang_delete_standardtext' =>
lang('delete the standard'),
@@ -115,9 +128,9 @@
(
'lang_add' =>
lang('add'),
'lang_add_standardtext' => lang('add a
standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_2.edit&type='.$type),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.edit', 'type'=> $type)),
'lang_done' =>
lang('done'),
- 'lang_done_standardtext' => lang('back
to admin'),
+ 'lang_done_standardtext'=> lang('back to
admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
);
@@ -139,7 +152,7 @@
'record_limit'
=> $record_limit,
'num_records'
=> count($standard_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_2.index&type='.$type),
+ 'link_url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.index', 'type'=> $type)),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_standardtext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_standardtext' =>
lang('Submit the search string'),
@@ -161,6 +174,11 @@
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -192,7 +210,7 @@
else
{
$function_msg = lang('add standard');
- $action='add';
+ $action ='add';
}
$link_data = array
@@ -208,7 +226,7 @@
(
'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.'.uistandard_2.index&type='.$type),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.index', 'type'=> $type)),
'lang_id'
=> lang('standard ID'),
'lang_name'
=> lang('name'),
'lang_descr'
=> lang('Descr'),
@@ -236,6 +254,11 @@
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$confirm =
get_var('confirm',array('POST'));
@@ -257,7 +280,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_2.delete&id='
. $id.'&type='.$type),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_2.delete', 'id'=> $id, 'type'=>$type)),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_standardtext' => lang('Delete the
entry'),
@@ -272,6 +295,5 @@
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('delete' => $data));
// $GLOBALS['phpgw']->xslttpl->pp();
}
-
}
?>
Index: inc/class.uistandard_3.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uistandard_3.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uistandard_3.inc.php 17 Jun 2006 08:45:56 -0000 1.11
+++ inc/class.uistandard_3.inc.php 14 Sep 2006 13:53:52 -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 admin
- * @version $Id: class.uistandard_3.inc.php,v 1.11 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uistandard_3.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -43,6 +43,14 @@
$this->bo =
CreateObject($this->currentapp.'.bostandard_3',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
+ $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl2_location = '.admin';
+ $this->acl_read =
$this->acl2->check($this->acl2_location,1);
+ $this->acl_add =
$this->acl2->check($this->acl2_location,2);
+ $this->acl_edit =
$this->acl2->check($this->acl2_location,4);
+ $this->acl_delete =
$this->acl2->check($this->acl2_location,8);
+ $this->acl_manage =
$this->acl2->check($this->acl2_location,16);
+
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -65,6 +73,11 @@
function index()
{
+ if(!$this->acl_read)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$GLOBALS['phpgw']->xslttpl->add_file(array('standard_3','nextmatchs',
@@ -82,8 +95,8 @@
'id'
=> $standard['id'],
'num'
=> $standard['num'],
'first'
=> $first,
- 'link_edit'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_3.edit&id='
. $standard['id'].'&type='.$type),
- 'link_delete'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_3.delete&id='
. $standard['id'].'&type='.$type),
+ 'link_edit' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.edit', 'id'=> $standard['id'], 'type'=>
$type)),
+ 'link_delete' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.delete', 'id'=> $standard['id'], 'type'=>
$type)),
'lang_view_standardtext' =>
lang('view the standard'),
'lang_edit_standardtext' =>
lang('edit the standard'),
'lang_delete_standardtext' =>
lang('delete the standard'),
@@ -125,7 +138,7 @@
(
'lang_add' =>
lang('add'),
'lang_add_standardtext' => lang('add a
standard'),
- 'add_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_3.edit&type='.$type),
+ 'add_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.edit', 'type'=> $type)),
'lang_done' =>
lang('done'),
'lang_done_standardtext' => lang('back
to admin'),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php')
@@ -139,7 +152,7 @@
'record_limit'
=> $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'],
'num_records'
=> count($standard_list),
'all_records'
=> $this->bo->total_records,
- 'link_url'
=>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_3.index&type='.$type),
+ 'link_url'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.index', 'type'=> $type)),
'img_path'
=> $GLOBALS['phpgw']->common->get_image_path('phpgwapi','default'),
'lang_searchfield_standardtext' => lang('Enter
the search string. To show all entries, empty this field and press the SUBMIT
button again'),
'lang_searchbutton_standardtext' =>
lang('Submit the search string'),
@@ -161,6 +174,11 @@
function edit()
{
+ if(!$this->acl_add)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -208,7 +226,7 @@
(
'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.'.uistandard_3.index&type='.$type),
+ 'done_action'
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.index', 'type'=> $type)),
'lang_id'
=> lang('standard ID'),
'lang_num'
=> lang('Name'),
'lang_descr'
=> lang('Descr'),
@@ -235,6 +253,11 @@
function delete()
{
+ if(!$this->acl_delete)
+ {
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+ }
+
$type = get_var('type',array('POST','GET'));
$id = get_var('id',array('POST','GET'));
$confirm =
get_var('confirm',array('POST'));
@@ -256,7 +279,7 @@
$data = array
(
'done_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uistandard_3.delete&id='
. $id.'&type='.$type),
+ 'delete_action' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>
$this->currentapp.'.uistandard_3.delete', 'id'=> $id, 'type'=> $type)),
'lang_confirm_msg' => lang('do you
really want to delete this entry'),
'lang_yes' =>
lang('yes'),
'lang_yes_standardtext' => lang('Delete the
entry'),
Index: setup/default_records.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/default_records.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- setup/default_records.inc.php 5 Apr 2006 13:10:10 -0000 1.24
+++ setup/default_records.inc.php 14 Sep 2006 13:53:52 -0000 1.25
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage setup
- * @version $Id: default_records.inc.php,v 1.24 2006/04/05 13:10:10
sigurdne Exp $
+ * @version $Id: default_records.inc.php,v 1.25 2006/09/14 13:53:52
sigurdne Exp $
*/
@@ -186,6 +186,9 @@
# fm_acl_location
#
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr,
allow_grant) VALUES ('.', 'Top', 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.admin', 'Admin')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.admin.entity', 'Admin entity')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.admin.location', 'Admin location')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.location', 'Location')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.tenant', 'Tenant')");
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_acl_location (id, descr)
VALUES ('.owner', 'Owner')");
Index: setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/setup.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- setup/setup.inc.php 9 May 2006 20:15:45 -0000 1.43
+++ setup/setup.inc.php 14 Sep 2006 13:53:52 -0000 1.44
@@ -8,12 +8,12 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage setup
- * @version $Id: setup.inc.php,v 1.43 2006/05/09 20:15:45 sigurdne Exp $
+ * @version $Id: setup.inc.php,v 1.44 2006/09/14 13:53:52 sigurdne Exp $
*/
$setup_info['property']['name'] = 'property';
$setup_info['property']['title'] = 'Property';
- $setup_info['property']['version'] = '0.9.17.523';
+ $setup_info['property']['version'] = '0.9.17.524';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Index: setup/tables_update.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/tables_update.inc.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- setup/tables_update.inc.php 10 May 2006 11:10:21 -0000 1.49
+++ setup/tables_update.inc.php 14 Sep 2006 13:53:52 -0000 1.50
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage setup
- * @version $Id: tables_update.inc.php,v 1.49 2006/05/10 11:10:21
sigurdne Exp $
+ * @version $Id: tables_update.inc.php,v 1.50 2006/09/14 13:53:52
sigurdne Exp $
*/
/**
@@ -1353,3 +1353,22 @@
$GLOBALS['setup_info']['property']['currentver'] = '0.9.17.523';
return $GLOBALS['setup_info']['property']['currentver'];
}
+
+ /**
+ * Update property version from 0.9.17.523 to 0.9.17.524
+ */
+
+ $test[] = '0.9.17.523';
+ function property_upgrade0_9_17_523()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_acl_location (id, descr) VALUES ('.admin', 'Admin')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_acl_location (id, descr) VALUES ('.admin.entity', 'Admin entity')");
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_acl_location (id, descr) VALUES ('.admin.location', 'Admin location')");
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+ $GLOBALS['setup_info']['property']['currentver'] = '0.9.17.524';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.soadmin_location.inc.php inc...,
Sigurd Nes <=