[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property inc/class.boadmin.inc.php inc/class.bo...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property inc/class.boadmin.inc.php inc/class.bo... |
Date: |
Thu, 05 Oct 2006 11:33:54 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Changes by: Sigurd Nes <sigurdne> 06/10/05 11:33:54
Modified files:
inc : class.boadmin.inc.php class.boinvoice.inc.php
class.menu.inc.php class.soadmin.inc.php
class.soadmin_entity.inc.php
class.socommon.inc.php class.soentity.inc.php
class.soinvoice.inc.php class.soproject.inc.php
class.sotts.inc.php class.soworkorder.inc.php
class.uiXport.inc.php class.uiactor.inc.php
class.uiadmin.inc.php
class.uiadmin_custom.inc.php
class.uiadmin_entity.inc.php
class.uiadmin_location.inc.php
class.uiagreement.inc.php class.uiasync.inc.php
class.uib_account.inc.php
class.uibudget.inc.php class.uicategory.inc.php
class.uicustom.inc.php class.uidocument.inc.php
class.uientity.inc.php class.uigab.inc.php
class.uiinvestment.inc.php
class.uiinvoice.inc.php
class.uilocation.inc.php class.uimeter.inc.php
class.uip_of_town.inc.php
class.uipricebook.inc.php
class.uiproject.inc.php
class.uir_agreement.inc.php
class.uirequest.inc.php
class.uis_agreement.inc.php
class.uistandard_2.inc.php
class.uistandard_3.inc.php
class.uitenant_claim.inc.php
class.uitts.inc.php class.uiwo_hour.inc.php
class.uiworkorder.inc.php hook_admin.inc.php
setup : setup.inc.php tables_current.inc.php
tables_update.inc.php
templates/base : admin.xsl
Removed files:
inc : class.acl2.inc.php
Log message:
Switched to the API's ACL
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boadmin.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boinvoice.inc.php?cvsroot=phpgroupware&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.menu.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.socommon.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soentity.inc.php?cvsroot=phpgroupware&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soinvoice.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soproject.inc.php?cvsroot=phpgroupware&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.sotts.inc.php?cvsroot=phpgroupware&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soworkorder.inc.php?cvsroot=phpgroupware&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiXport.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiactor.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin.inc.php?cvsroot=phpgroupware&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_custom.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_location.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiagreement.inc.php?cvsroot=phpgroupware&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiasync.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uib_account.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uibudget.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uicategory.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uicustom.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uidocument.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uigab.inc.php?cvsroot=phpgroupware&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiinvestment.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiinvoice.inc.php?cvsroot=phpgroupware&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uilocation.inc.php?cvsroot=phpgroupware&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uimeter.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.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uipricebook.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uir_agreement.inc.php?cvsroot=phpgroupware&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uirequest.inc.php?cvsroot=phpgroupware&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uis_agreement.inc.php?cvsroot=phpgroupware&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uistandard_2.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uistandard_3.inc.php?cvsroot=phpgroupware&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uitenant_claim.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uitts.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiwo_hour.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiworkorder.inc.php?cvsroot=phpgroupware&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/property/inc/hook_admin.inc.php?cvsroot=phpgroupware&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.acl2.inc.php?cvsroot=phpgroupware&r1=1.14&r2=0
http://cvs.savannah.gnu.org/viewcvs/property/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/property/setup/tables_current.inc.php?cvsroot=phpgroupware&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/property/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/admin.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: inc/class.boadmin.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boadmin.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.boadmin.inc.php 4 Oct 2006 08:18:49 -0000 1.12
+++ inc/class.boadmin.inc.php 5 Oct 2006 11:33:53 -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.boadmin.inc.php,v 1.12 2006/10/04 08:18:49
sigurdne Exp $
+ * @version $Id: class.boadmin.inc.php,v 1.13 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -30,11 +30,9 @@
{
$this->currentapp =
$GLOBALS['phpgw_info']['flags']['currentapp'];
$this->so =
CreateObject($this->currentapp.'.soadmin');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
+ $this->acl =
CreateObject('phpgwapi.acl');
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->right = array(1,2,4,8,16,32,64,128);
- $this->app_id =
$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['id'];
- // $this->app_id
=$GLOBALS['phpgw']->applications->data[$GLOBALS['phpgw_info']['flags']['currentapp']]['id'];
if ($session)
{
@@ -128,11 +126,8 @@
}
}
-
-
function select_location($format='',$selected='',$grant='')
{
-
switch($format)
{
case 'select':
@@ -192,28 +187,39 @@
return
$this->bocommon->select_list($selected,$categories);
}
- function set_permission2($values,$r_processed,$type)
+ function set_permission2($values,$r_processed, $grantor = 0,
$type = 0)
+ {
+ if ( !is_array($values) )
{
- @reset($values);
+ return;
+ }
+
$totalacl = array();
- while(list($rowinfo,$perm) = each($values))
+ foreach ( $values as $rowinfo => $perm )
{
- list($user_id,$rights) = split('_',$rowinfo);
- if(!isset($totalacl[$user_id]))
+ list($user_id,$rights) = split('_', $rowinfo);
+
+ if ( !isset($totalacl[$user_id]) )
{
- $totalacl[$user_id] =0;
+ $totalacl[$user_id] = 0;
}
+
$totalacl[$user_id] += $rights;
}
- @reset($totalacl);
- while(list($user_id,$rights) = @each($totalacl))
+
+ $user_checked = array();
+ foreach ( $totalacl as $user_id => $rights )
{
- $user_checked[]=$user_id;
+ $user_checked[] = $user_id;
-
$this->acl2->set($this->location,$rights,$user_id,$type);
+ $this->acl->account_id = $user_id;
+ $this->acl->read_repository();
+ $this->acl->delete($this->acl_app,
$this->location, $grantor, $type);
+ $this->acl->add($this->acl_app,
$this->location, $rights, $grantor, $type);
+ $this->acl->save_repository();
}
- if( (isset($r_processed) && is_array($r_processed)) &&
(isset($user_checked) && is_array($user_checked)) )
+ if (is_array($r_processed) && count($user_checked))
{
$user_delete = array_diff($r_processed,
$user_checked);
}
@@ -221,261 +227,145 @@
{
$user_delete = $r_processed;
}
- if(isset($user_delete) && is_array($user_delete) &&
count($user_delete)>0)
+ if(is_array($user_delete) && count($user_delete)>0)
{
- $user_delete= explode("_",implode("_",
$user_delete));
-
- $this->remove_permission($user_delete,$type);
+ while(list(,$user_id) = each($user_delete))
+ {
+ $this->acl->account_id = $user_id;
+ $this->acl->read_repository();
+ $this->acl->delete($this->acl_app,
$this->location, $grantor, $type);
+ $this->acl->save_repository();
+ }
}
}
- function set_permission($values,$r_processed,$initials)
+ function set_permission($values,$r_processed,$set_grant =
false,$initials='')
{
if($initials)
{
$this->so->set_initials($initials);
}
- $r_processed=explode("_",$r_processed);
+ $process = explode('_', $r_processed);
- if(!isset($values['right']))
+ if ( !isset($values['right']) ||
!is_array($values['right']) )
{
$values['right'] = array();
}
- if(!isset($values['mask']))
- {
- $values['mask'] = array();
- }
-
- $this->set_permission2($values['right'],$r_processed,0);
- $this->set_permission2($values['mask'],$r_processed,1);
-
-// $this->acl2->check('.invoice.test', $rights,$user_id);
-// echo 'rights_cache:<pre>'; print_r($this->acl2->rights_cache); echo
'</pre>';
-
- $receipt['message'][] = array('msg' =>
lang('permissions are updated!'));
- return $receipt;
- }
- function set_grant2($values,$r_processed,$type)
- {
- @reset($values);
- $totalacl = array();
- while(list($rowinfo,$perm) = each($values))
- {
- list($user_id,$rights) = split('_',$rowinfo);
- if(!isset($totalacl[$user_id]))
+ if ( !isset($values['mask']) ||
!is_array($values['mask']) )
{
- $totalacl[$user_id] =0;
+ $values['mask'] = array();
}
- $totalacl[$user_id] += $rights;
- }
- @reset($totalacl);
- while(list($user_id,$rights) = @each($totalacl))
+ $grantor = 0;
+ if($set_grant)
{
- $user_checked[]=$user_id;
-
-
$this->acl2->set_grant($this->location,$rights,$user_id,$type,$this->granting_group);
- }
-
- if( isset($r_processed) && is_array($r_processed) &&
isset($user_checked) && is_array($user_checked))
+ if($this->granting_group)
{
- $user_delete = array_diff($r_processed,
$user_checked);
+ $grantor = $this->granting_group;
}
else
{
- $user_delete = $r_processed;
- }
- if( isset($user_delete) && is_array($user_delete) &&
count($user_delete)>0)
- {
- $user_delete= explode("_",implode("_",
$user_delete));
-
- $this->remove_grant($user_delete,$type);
- }
-
- }
-
- function set_grant($values,$r_processed)
- {
- $r_processed=explode("_",$r_processed);
-
- if(!isset($values['right']))
- {
- $values['right'] = array();
+ $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
}
- if(!isset($values['mask']))
- {
- $values['mask'] = array();
}
- $this->set_grant2($values['right'],$r_processed,0);
- $this->set_grant2($values['mask'],$r_processed,1);
+ $this->set_permission2($values['right'], $process,
$grantor, 0);
+ $this->set_permission2($values['mask'], $process,
$grantor, 1);
$receipt['message'][] = array('msg' =>
lang('permissions are updated!'));
return $receipt;
}
- function remove_permission($user_delete,$type)
+ function get_user_list($type='',$get_grants='')
{
-
- $right=$this->right;
-
- for ($i=0;$i<count($user_delete);$i++)
- {
- for ($j=0;$j<count($right);$j++)
+ if($type == 'groups')
{
-
$this->acl2->remove($this->location,$right[$j],$user_delete[$i],$type);
- }
- }
+ $check_account_type = array('accounts');
}
-
- function remove_grant($user_delete,$type)
- {
-
- $right=$this->right;
-
- for ($i=0;$i<count($user_delete);$i++)
- {
- for ($j=0;$j<count($right);$j++)
+ else
{
-
$this->acl2->remove_grant($this->location,$right[$j],$user_delete[$i],$type,$this->granting_group);
- }
- }
+ $check_account_type =
array('groups','accounts');
}
- function get_user_list($type='',$app_id='')
+ $grantor = 0;
+ if($get_grants)
{
if($this->granting_group)
{
- $owner = $this->granting_group;
+ $grantor = $this->granting_group;
}
else
{
- $owner =
$GLOBALS['phpgw_info']['user']['account_id'];
+ $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
+ }
}
$right=$this->right;
- $GLOBALS['phpgw']->accounts->account_id = $owner;
+ $offset =
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+ if ($this->allrows)
+ {
+ $this->start = -1;
+ $offset = -1;
+ }
- $allusers =
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort,
$this->order, $this->query, $this->offset);
+ $allusers =
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort,
$this->order, $this->query, $offset);
- if (isSet($allusers) AND is_array($allusers))
+ if ( isset($allusers) && is_array($allusers))
{
$j=0;
foreach($allusers as $account)
{
-
if($account['account_id']!=$GLOBALS['phpgw_info']['user']['account_id'] ||
$this->granting_group)
- {
$user_list[$j]['account_id']
= $account['account_id'];
$user_list[$j]['account_lid']
= $account['account_lid'];
$user_list[$j]['account_firstname'] = $account['account_firstname'];
$user_list[$j]['account_lastname'] = $account['account_lastname'];
- $user_list[$j]['initials']
= $this->so->get_initials($account['account_id']);
- $count_right=count($right);
- for ($i=0;$i<$count_right;$i++)
- {
-
if($this->acl2->check_grant($owner,$this->location,
$right[$i],$account['account_id'],$app_id,True,0,True))
- {
-
$user_list[$j]['right'][$right[$i]] = 'checked';
- }
-
if($this->acl2->check_grant($owner,$this->location,
$right[$i],$account['account_id'],$this->app_id,True,1,True))
+ if($this->location == '.invoice')
{
-
$user_list[$j]['mask'][$right[$i]] = 'checked';
- }
+ $user_list[$j]['initials']
= $this->so->get_initials($account['account_id']);
}
- if
(isSet($user_list[$j]['mask']) AND is_array($user_list[$j]['mask']))
+
$this->acl->account_id=$account['account_id'];
+
+ $this->acl->read_repository();
+
+ $count_right=count($right);
+ for ( $i = 0; $i < $count_right; ++$i )
{
- $result_temp =
@array_diff(array_keys($user_list[$j]['right']),
array_keys($user_list[$j]['mask']));
- if (isSet($result_temp)
AND is_array($result_temp))
+
if($this->acl->check_brutto($this->location,
$right[$i],$this->acl_app,$grantor,0,$check_account_type))
{
-
foreach($result_temp as $temp)
+
if($this->acl->account_type == 'g')
{
-
$user_list[$j]['result'][$temp] = 'checked';
- }
- }
+
$user_list[$j]['right'][$right[$i]] = 'from_group';
}
else
{
-
$user_list[$j]['result'] =
(isset($user_list[$j]['right'])?$user_list[$j]['right']:'');
- }
-
- $user_list[$j]['right']['type']
= 'right';
- $user_list[$j]['mask']['type']
= 'mask';
-
$user_list[$j]['result']['type'] = 'result';
-
- $j++;
- }
- }
+
$user_list[$j]['right'][$right[$i]] = 'checked';
}
-
- $this->total_records =
$GLOBALS['phpgw']->accounts->total;
-
-//_debug_array($user_list);
-
- return $user_list;
+
$user_list[$j]['result'][$right[$i]] = 'checked';
}
-
-
- function get_user_list2($type='')
- {
- $right=$this->right;
-
- $allusers =
$GLOBALS['phpgw']->accounts->get_list($type, $this->start,$this->sort,
$this->order, $this->query, $this->offset);
-
- if (isSet($allusers) AND is_array($allusers))
- {
- $j=0;
- foreach($allusers as $account)
- {
- $user_list[$j]['account_id']
= $account['account_id'];
- $user_list[$j]['account_lid']
= $account['account_lid'];
- $user_list[$j]['account_firstname']
= $account['account_firstname'];
- $user_list[$j]['account_lastname']
= $account['account_lastname'];
- $user_list[$j]['initials']
= $this->so->get_initials($account['account_id']);
-
- $count_right=count($right);
- for ($i=0;$i<$count_right;$i++)
+
if($this->acl->check_brutto($this->location,
$right[$i],$this->acl_app,$grantor,1,$check_account_type))
{
-
if($this->acl2->check($this->location,
$right[$i],$account['account_id'],$this->app_id,True,0,True))
+
if($this->acl->account_type == 'g')
{
-
$user_list[$j]['right'][$right[$i]] = 'checked';
+
$user_list[$j]['mask'][$right[$i]] = 'from_group';
}
-
if($this->acl2->check($this->location,
$right[$i],$account['account_id'],$this->app_id,True,1,True))
+ else
{
$user_list[$j]['mask'][$right[$i]] = 'checked';
}
- }
-
- if (isSet($user_list[$j]['mask']) AND
is_array($user_list[$j]['mask']))
- {
- $result_temp =
@array_diff(array_keys($user_list[$j]['right']),
array_keys($user_list[$j]['mask']));
- if (isSet($result_temp) AND
is_array($result_temp))
- {
- foreach($result_temp as
$temp)
- {
-
$user_list[$j]['result'][$temp] = 'checked';
- }
+
unset($user_list[$j]['result'][$right[$i]]);
}
}
- else
- {
- $user_list[$j]['result'] =
(isset($user_list[$j]['right'])?$user_list[$j]['right']:'');
- }
-
- $user_list[$j]['right']['type'] =
'right';
- $user_list[$j]['mask']['type'] = 'mask';
- $user_list[$j]['result']['type'] =
'result';
$j++;
}
}
-
$this->total_records =
$GLOBALS['phpgw']->accounts->total;
-
+//_debug_array($user_list);
return $user_list;
}
Index: inc/class.boinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boinvoice.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- inc/class.boinvoice.inc.php 26 Jun 2006 07:42:05 -0000 1.23
+++ inc/class.boinvoice.inc.php 5 Oct 2006 11:33:53 -0000 1.24
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.boinvoice.inc.php,v 1.23 2006/06/26 07:42:05
sigurdne Exp $
+ * @version $Id: class.boinvoice.inc.php,v 1.24 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -547,14 +547,14 @@
$values['budsjettansvarligid'] =
$values['budget_responsible'];
}
- $acl2 =
CreateObject($this->currentapp.'.acl2',$user_id);
- if($acl2->check('.invoice',32) &&
!$acl2->check('.invoice',64)):
+ $acl = CreateObject('phpgwapi.acl',$user_id);
+ if($acl->check('.invoice',32) &&
!$acl->check('.invoice',64)):
{
$values['janitor'] =
$GLOBALS['phpgw']->accounts->id2name($user_id);
$values['oppsynsmannid'] =
$values['janitor'];
}
- // elseif((!$acl2->check('.invoice',32) &&
$acl2->check('.invoice',64)) || ($acl2->check('.invoice',32) &&
$acl2->check('.invoice',64))):
- elseif($acl2->check('.invoice',64)):
+ // elseif((!$acl->check('.invoice',32) &&
$acl->check('.invoice',64)) || ($acl->check('.invoice',32) &&
$acl->check('.invoice',64))):
+ elseif($acl->check('.invoice',64)):
{
$values['supervisor'] =
$GLOBALS['phpgw']->accounts->id2name($user_id);
$values['saksbehandlerid'] =
$values['supervisor'];
Index: inc/class.menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.menu.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- inc/class.menu.inc.php 11 Sep 2006 14:46:29 -0000 1.27
+++ inc/class.menu.inc.php 5 Oct 2006 11:33:53 -0000 1.28
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.menu.inc.php,v 1.27 2006/09/11 14:46:29 sigurdne
Exp $
+ * @version $Id: class.menu.inc.php,v 1.28 2006/10/05 11:33:53 sigurdne
Exp $
*/
/**
@@ -39,7 +39,7 @@
//_debug_array($page);
if(!$menu)
{
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl =
CreateObject('phpgwapi.acl');
$i=0;
if($sub=='location')
@@ -234,7 +234,7 @@
$menu['sub_menu'][$i]['statustext']
= lang('Tenant');
$i++;
- if ($this->acl2->check('.invoice',16))
+ if ($this->acl->check('.invoice',16))
{
if($page=='investment')
{
@@ -264,7 +264,7 @@
$i++;
}
- if ($this->acl2->check('.invoice',2))
+ if ($this->acl->check('.invoice',2))
{
if($page=='add_inv')
{
@@ -277,7 +277,7 @@
}
}
- if ($sub == 'pricebook' &&
$this->acl2->check('.pricebook',16))
+ if ($sub == 'pricebook' &&
$this->acl->check('.pricebook',16))
{
if($page=='agreement_group')
{
@@ -348,7 +348,7 @@
$menu['sub_menu'][$i]['statustext']
= lang('alarm');
$i++;
- if($this->acl2->check('.pricebook',16)
&& $page=='agreement')
+ if($this->acl->check('.pricebook',16)
&& $page=='agreement')
{
$j=0;
if($page_2=='agreement_group')
@@ -440,7 +440,7 @@
$i++;
}
- if ($sub == 'adm_loc' &&
$this->acl2->check('.location',16))
+ if ($sub == 'adm_loc' &&
$this->acl->check('.location',16))
{
if($page=='loc_type')
{
Index: inc/class.soadmin.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- inc/class.soadmin.inc.php 4 Oct 2006 08:19:03 -0000 1.8
+++ inc/class.soadmin.inc.php 5 Oct 2006 11:33:53 -0000 1.9
@@ -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.inc.php,v 1.8 2006/10/04 08:19:03
sigurdne Exp $
+ * @version $Id: class.soadmin.inc.php,v 1.9 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -60,7 +60,7 @@
{
$filter = ' WHERE allow_grant=1';
}
- $this->db->query("SELECT * FROM fm_acl_location $filter
ORDER BY id ");
+ $this->db->query("SELECT * FROM phpgw_acl_location
$filter ORDER BY id ");
$i = 0;
while ($this->db->next_record())
Index: inc/class.soadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_entity.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- inc/class.soadmin_entity.inc.php 18 Sep 2006 08:22:32 -0000 1.21
+++ inc/class.soadmin_entity.inc.php 5 Oct 2006 11:33:53 -0000 1.22
@@ -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_entity.inc.php,v 1.21 2006/09/18 08:22:32
sigurdne Exp $
+ * @version $Id: class.soadmin_entity.inc.php,v 1.22 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -346,6 +346,7 @@
$values_acl_location= array(
+ $this->currentapp,
'.entity.' . $entity['id'],
$entity['name'],
1
@@ -353,7 +354,7 @@
$values_acl_location =
$this->bocommon->validate_db_insert($values_acl_location);
- $this->db->query("INSERT INTO fm_acl_location
(id,descr,allow_grant) "
+ $this->db->query("INSERT INTO phpgw_acl_location
(appname,id,descr,allow_grant) "
. "VALUES
($values_acl_location)",__LINE__,__FILE__);
$receipt['id']= $entity['id'];
@@ -443,6 +444,7 @@
. "VALUES ($values_insert)",__LINE__,__FILE__);
$values_acl_location= array(
+ $this->currentapp,
'.entity.' . $values['entity_id'] . '.' .
$values['id'],
$values['name'],
1
@@ -450,7 +452,7 @@
$values_acl_location =
$this->bocommon->validate_db_insert($values_acl_location);
- $this->db->query("INSERT INTO fm_acl_location
(id,descr,allow_grant) "
+ $this->db->query("INSERT INTO phpgw_acl_location
(appname,id,descr,allow_grant) "
. "VALUES
($values_acl_location)",__LINE__,__FILE__);
$receipt['id']= $values['id'];
@@ -568,7 +570,7 @@
$value_set_acl =
$this->bocommon->validate_db_update($value_set_acl);
- $this->db->query("UPDATE fm_acl_location set
$value_set_acl WHERE id='.entity." . $entity['id']. "'",__LINE__,__FILE__);
+ $this->db->query("UPDATE phpgw_acl_location set
$value_set_acl WHERE appname = '" . $this->currentapp . "' AND id='.entity." .
$entity['id']. "'",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_lookup
WHERE type='lookup' AND entity_id=" . $entity['id'],__LINE__,__FILE__);
if (isset($entity['include_entity_for']) AND
is_array($entity['include_entity_for']))
@@ -640,7 +642,7 @@
$value_set_acl =
$this->bocommon->validate_db_update($value_set_acl);
- $this->db->query("UPDATE fm_acl_location set
$value_set_acl WHERE id='.entity." . $entity['entity_id']. "." . $entity['id'].
"'",__LINE__,__FILE__);
+ $this->db->query("UPDATE phpgw_acl_location set
$value_set_acl WHERE appname = '" . $this->currentapp . "' AND id='.entity." .
$entity['entity_id']. "." . $entity['id']. "'",__LINE__,__FILE__);
$receipt['message'][] = array('msg'=>
lang('entity has been edited'));
@@ -659,8 +661,8 @@
$this->db->query("DELETE FROM fm_entity WHERE
id=$id",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_category WHERE
entity_id=$id",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_attribute WHERE
entity_id=$id",__LINE__,__FILE__);
- $this->db->query("DELETE FROM fm_acl_location WHERE id
$this->like '.entity." . $id ."%'",__LINE__,__FILE__);
- $this->db->query("DELETE FROM fm_acl2 WHERE
acl_location $this->like '.entity." . $id ."%'",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM phpgw_acl_location WHERE
appname = '" . $this->currentapp . "' AND id " . $this->like ."'.entity." . $id
."%'",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM phpgw_acl WHERE
acl_appname = '" . $this->currentapp . "' AND acl_location $this->like
'.entity." . $id ."%'",__LINE__,__FILE__);
if (isset($category_list) AND is_array($category_list))
{
$this->init_process();
@@ -680,8 +682,8 @@
// $this->oProc->DropTable('fm_entity_' . $entity_id . '_'
. $id . '_' . 'status');
$this->db->query("DELETE FROM fm_entity_category WHERE
entity_id= $entity_id AND id= $id",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_attribute WHERE
entity_id= $entity_id AND cat_id= $id",__LINE__,__FILE__);
- $this->db->query("DELETE FROM fm_acl_location WHERE
id='.entity." . $entity_id . "." . $id ."'",__LINE__,__FILE__);
- $this->db->query("DELETE FROM fm_acl2 WHERE
acl_location='.entity." . $entity_id . "." . $id ."'",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM phpgw_acl_location WHERE
appname = '" . $this->currentapp . "' AND id='.entity." . $entity_id . "." .
$id ."'",__LINE__,__FILE__);
+ $this->db->query("DELETE FROM phpgw_acl WHERE
acl_appname = '" . $this->currentapp . "' AND acl_location='.entity." .
$entity_id . "." . $id ."'",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_history WHERE
history_appname = 'entity_" . $entity_id . '_' . $id . "'",__LINE__,__FILE__);
}
Index: inc/class.socommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- inc/class.socommon.inc.php 3 Oct 2006 09:58:09 -0000 1.26
+++ inc/class.socommon.inc.php 5 Oct 2006 11:33:53 -0000 1.27
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage core
- * @version $Id: class.socommon.inc.php,v 1.26 2006/10/03 09:58:09
sigurdne Exp $
+ * @version $Id: class.socommon.inc.php,v 1.27 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -105,10 +105,10 @@
function get_user_list_right($right='',$acl_location='')
{
- $acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
+ $acl = CreateObject('phpgwapi.acl');
$myaccounts = CreateObject('phpgwapi.accounts');
- $sql = "SELECT * FROM phpgw_accounts $this->join
fm_acl2 on phpgw_accounts.account_id=fm_acl2.acl_account WHERE account_status =
'A' AND acl_location $this->like '%$acl_location%' order by account_lastname
ASC";
+ $sql = "SELECT * FROM phpgw_accounts $this->join
phpgw_acl on phpgw_accounts.account_id=phpgw_acl.acl_account WHERE
account_status = 'A' AND acl_location $this->like '%$acl_location%' order by
account_lastname ASC";
$this->db->query($sql,__LINE__,__FILE__);
while ($this->db->next_record())
{
@@ -121,7 +121,7 @@
foreach ($active_accounts as $entry)
{
-
if($acl2->check($acl_location,$right,$entry['acl_account']))
+
if($acl->check($acl_location,$right,$entry['acl_account']))
{
if($entry['account_type']=='g')
{
@@ -157,7 +157,7 @@
foreach($accounts as $account_id)
{
$i=0;
-
if(!$acl2->check($acl_location,$right,$account_id[0]))
+
if(!$acl->check($acl_location,$right,$account_id[0]))
{
unset($accounts[$account_id[0]]);
}
Index: inc/class.soentity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- inc/class.soentity.inc.php 3 Oct 2006 09:58:09 -0000 1.19
+++ inc/class.soentity.inc.php 5 Oct 2006 11:33:53 -0000 1.20
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage entity
- * @version $Id: class.soentity.inc.php,v 1.19 2006/10/03 09:58:09
sigurdne Exp $
+ * @version $Id: class.soentity.inc.php,v 1.20 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -101,8 +101,8 @@
if(!$grants)
{
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
- $grants =
$this->acl2->get_grants($this->currentapp,'.entity.' . $entity_id . '.' .
$cat_id);
+ $this->acl = CreateObject('phpgwapi.acl');
+ $grants =
$this->acl->get_grants($this->currentapp,'.entity.' . $entity_id . '.' .
$cat_id);
$GLOBALS['phpgw']->session->appsession('grants_entity_'.$entity_id.'_'.$cat_id,$this->currentapp,$grants);
}
Index: inc/class.soinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- inc/class.soinvoice.inc.php 25 Jun 2006 17:24:06 -0000 1.27
+++ inc/class.soinvoice.inc.php 5 Oct 2006 11:33:53 -0000 1.28
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.soinvoice.inc.php,v 1.27 2006/06/25 17:24:06
sigurdne Exp $
+ * @version $Id: class.soinvoice.inc.php,v 1.28 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -27,7 +27,7 @@
$this->db2 = $this->bocommon->new_db();
$this->account_id =
$GLOBALS['phpgw_info']['user']['account_id'];
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
+ $this->acl = CreateObject('phpgwapi.acl');
$this->join = $this->bocommon->join;
$this->left_join = $this->bocommon->left_join;
@@ -749,10 +749,10 @@
if(!$this->role)
{
$this->role=array(
- 'is_janitor'
=> $this->acl2->check('.invoice',32),
- 'is_supervisor'
=> $this->acl2->check('.invoice',64),
- 'is_budget_responsible' =>
$this->acl2->check('.invoice',128),
- 'is_transfer'
=> $this->acl2->check('.invoice',16)
+ 'is_janitor'
=> $this->acl->check('.invoice',32),
+ 'is_supervisor'
=> $this->acl->check('.invoice',64),
+ 'is_budget_responsible' =>
$this->acl->check('.invoice',128),
+ 'is_transfer'
=> $this->acl->check('.invoice',16)
);
}
return $this->role;
@@ -908,7 +908,7 @@
function get_invoice_user_list()
{
- $sql = "SELECT * FROM fm_acl2 $this->join
phpgw_accounts on phpgw_accounts.account_id=fm_acl2.acl_account where
acl_location ='.invoice' and account_type='u' order by account_lastname";
+ $sql = "SELECT * FROM phpgw_acl $this->join
phpgw_accounts on phpgw_accounts.account_id=phpgw_acl.acl_account where
acl_location ='.invoice' and account_type='u' order by account_lastname";
$this->db->query($sql,__LINE__,__FILE__);
$employees[] = Array(
Index: inc/class.soproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- inc/class.soproject.inc.php 1 Oct 2006 20:10:04 -0000 1.34
+++ inc/class.soproject.inc.php 5 Oct 2006 11:33:53 -0000 1.35
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.soproject.inc.php,v 1.34 2006/10/01 20:10:04
sigurdne Exp $
+ * @version $Id: class.soproject.inc.php,v 1.35 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -35,8 +35,8 @@
if(!$this->grants)
{
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
- $this->grants =
$this->acl2->get_grants($this->currentapp,'.project');
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->grants =
$this->acl->get_grants($this->currentapp,'.project');
$GLOBALS['phpgw']->session->appsession('grants_project',$this->currentapp,$this->grants);
}
}
Index: inc/class.sotts.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- inc/class.sotts.inc.php 18 Sep 2006 18:26:43 -0000 1.17
+++ inc/class.sotts.inc.php 5 Oct 2006 11:33:53 -0000 1.18
@@ -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.sotts.inc.php,v 1.17 2006/09/18 18:26:43 sigurdne
Exp $
+ * @version $Id: class.sotts.inc.php,v 1.18 2006/10/05 11:33:53 sigurdne
Exp $
*/
/**
@@ -79,8 +79,8 @@
if(!$this->grants)
{
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
- $this->grants =
$this->acl2->get_grants($this->currentapp,'.ticket');
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->grants =
$this->acl->get_grants($this->currentapp,'.ticket');
$GLOBALS['phpgw']->session->appsession('grants_ticket',$this->currentapp,$this->grants);
}
*/
Index: inc/class.soworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- inc/class.soworkorder.inc.php 1 Oct 2006 20:10:04 -0000 1.23
+++ inc/class.soworkorder.inc.php 5 Oct 2006 11:33:53 -0000 1.24
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.soworkorder.inc.php,v 1.23 2006/10/01 20:10:04
sigurdne Exp $
+ * @version $Id: class.soworkorder.inc.php,v 1.24 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -38,8 +38,8 @@
if(!$this->grants)
{
- $this->acl2 =
CreateObject($this->currentapp.'.acl2','##DEFAULT##','##DEFAULT##');
- $this->grants =
$this->acl2->get_grants($this->currentapp,'.project');
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->grants =
$this->acl->get_grants($this->currentapp,'.project');
$GLOBALS['phpgw']->session->appsession('grants_project',$this->currentapp,$this->grants);
}
}
Index: inc/class.uiXport.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiXport.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- inc/class.uiXport.inc.php 13 Sep 2006 12:56:22 -0000 1.18
+++ inc/class.uiXport.inc.php 5 Oct 2006 11:33:53 -0000 1.19
@@ -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.uiXport.inc.php,v 1.18 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uiXport.inc.php,v 1.19 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -44,13 +44,13 @@
$this->contacts =
CreateObject($this->currentapp.'.soactor');
$this->contacts->role = 'vendor';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.invoice';
- $this->acl_read =
$this->acl2->check('.invoice',1);
- $this->acl_add =
$this->acl2->check('.invoice',2);
- $this->acl_edit =
$this->acl2->check('.invoice',4);
- $this->acl_delete =
$this->acl2->check('.invoice',8);
- $this->acl_manage =
$this->acl2->check('.invoice',16);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.invoice';
+ $this->acl_read =
$this->acl->check('.invoice',1);
+ $this->acl_add =
$this->acl->check('.invoice',2);
+ $this->acl_edit =
$this->acl->check('.invoice',4);
+ $this->acl_delete =
$this->acl->check('.invoice',8);
+ $this->acl_manage =
$this->acl->check('.invoice',16);
$this->start = $this->bo->start;
$this->limit = $this->bo->limit;
@@ -66,7 +66,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$receipt =
$GLOBALS['phpgw']->session->appsession('session_data','import_receipt');
@@ -502,7 +502,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
@@ -595,7 +595,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
Index: inc/class.uiactor.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiactor.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.uiactor.inc.php 13 Sep 2006 12:56:22 -0000 1.20
+++ inc/class.uiactor.inc.php 5 Oct 2006 11:33:53 -0000 1.21
@@ -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.uiactor.inc.php,v 1.20 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uiactor.inc.php,v 1.21 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -58,14 +58,14 @@
$this->cats =
CreateObject('phpgwapi.categories');
$this->cats->app_name = 'fm_' . $this->role;
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location= '.' . $this->role;
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location= '.' . $this->role;
- $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->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -165,7 +165,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('actor',
@@ -363,7 +363,7 @@
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$actor_id =
get_var('actor_id',array('POST','GET'));
@@ -521,7 +521,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$attrib = get_var('attrib',array('POST','GET'));
@@ -578,7 +578,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$actor_id = get_var('actor_id',array('GET'));
@@ -632,7 +632,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -769,7 +769,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
Index: inc/class.uiadmin.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- inc/class.uiadmin.inc.php 4 Oct 2006 08:19:03 -0000 1.16
+++ inc/class.uiadmin.inc.php 5 Oct 2006 11:33:53 -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.inc.php,v 1.16 2006/10/04 08:19:03
sigurdne Exp $
+ * @version $Id: class.uiadmin.inc.php,v 1.17 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -32,7 +32,7 @@
var $public_functions = array
(
- 'list_acl2' => True,
+ 'list_acl' => True,
'aclprefs' => True,
'edit_id' => True,
'contact_info' => True
@@ -46,16 +46,18 @@
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
$this->bo =
CreateObject($this->currentapp.'.boadmin',true);
+ $this->bopreferences =
createObject('preferences.boadmin_acl',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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
+ $this->acl_app = $this->bo->acl_app;
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
$this->sort =
$this->bo->sort;
@@ -65,6 +67,8 @@
$this->location =
$this->bo->location;
$this->granting_group =
$this->bo->granting_group;
$this->allrows =
$this->bo->allrows;
+
+
}
function save_sessiondata()
@@ -87,28 +91,24 @@
function aclprefs()
{
-
$GLOBALS['phpgw']->xslttpl->add_file(array('admin','nextmatchs',
'search_field'));
$values =
get_var('values',array('POST'));
$r_processed =
get_var('processed',array('POST'));
- $acl_app =
get_var('acl_app',array('GET'));
+ // $acl_app =
get_var('acl_app',array('GET'));
$set_permission =
get_var('set_permission',array('POST'));
- $app_id =
$GLOBALS['phpgw_info']['apps'][$acl_app]['id'];
- // $app_id =
$GLOBALS['phpgw']->applications->data[$acl_app]['id'];
-
if($set_permission)
{
- $receipt =
$this->bo->set_grant($values,$r_processed);
+ $receipt =
$this->bo->set_permission($values,$r_processed,true);
}
if ($this->location)
{
if(!$this->cat_id || $this->cat_id=='accounts')
{
- $user_list =
$this->bo->get_user_list('accounts',$app_id);
+ $user_list =
$this->bo->get_user_list('accounts',true);
}
if(isset($user_list) && is_array($user_list))
@@ -147,7 +147,8 @@
if(!$this->cat_id || $this->cat_id=='groups')
{
- $group_list =
$this->bo->get_user_list('groups',$app_id);
+ $group_list =
$this->bo->get_user_list('groups',true);
+
}
@@ -267,7 +268,7 @@
'lang_no_location'
=> lang('No location'),
'lang_location_statustext'
=> lang('Select submodule'),
'select_name_location'
=> 'module',
- 'location_list'
=> $this->bo->select_location('filter',$this->location,True),
+ 'location_list'
=> $this->bopreferences->select_location('filter',$this->location,True),
'is_admin'
=> $GLOBALS['phpgw_info']['user']['apps']['admin'],
'lang_group_statustext'
=> lang('Select the granting group. To do not use a granting group select NO
GRANTING GROUP'),
@@ -287,7 +288,7 @@
}
- function list_acl2()
+ function list_acl()
{
$GLOBALS['phpgw']->xslttpl->add_file(array('admin','nextmatchs',
@@ -301,14 +302,14 @@
if($set_permission)
{
- $receipt =
$this->bo->set_permission($values,$r_processed,$initials);
+ $receipt =
$this->bo->set_permission($values,$r_processed,false,$initials);
}
if ($this->location)
{
if($this->cat_id=='accounts')
{
- $user_list =
$this->bo->get_user_list2('accounts');
+ $user_list =
$this->bo->get_user_list('accounts');
}
if (isSet($user_list) AND is_array($user_list))
@@ -365,7 +366,7 @@
if($this->cat_id=='groups')
{
- $group_list =
$this->bo->get_user_list2('groups');
+ $group_list =
$this->bo->get_user_list('groups');
}
if (isSet($group_list) AND
is_array($group_list))
@@ -423,7 +424,7 @@
'sort' => $this->sort,
'var' => 'account_lid',
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
+
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl',
'cat_id' => $this->cat_id,
'query' => $this->query,
'module' => $this->location,
@@ -434,7 +435,7 @@
'sort' => $this->sort,
'var' => 'account_lastname',
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
+
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl',
'cat_id' => $this->cat_id,
'query' => $this->query,
'module' => $this->location,
@@ -445,7 +446,7 @@
'sort' => $this->sort,
'var' => 'account_firstname',
'order' => $this->order,
-
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
+
'extra' => array('menuaction' =>
$this->currentapp.'.uiadmin.list_acl',
'cat_id' => $this->cat_id,
'query' => $this->query,
'module' => $this->location,
@@ -467,7 +468,7 @@
$link_data = array
(
- 'menuaction' =>
$this->currentapp.'.uiadmin.list_acl2',
+ 'menuaction'=>
$this->currentapp.'.uiadmin.list_acl',
'sort' => $this->sort,
'order' => $this->order,
'cat_id' => $this->cat_id,
@@ -526,8 +527,8 @@
'query'
=> $this->query,
'lang_search'
=> lang('search'),
'table_header_permission'
=> $table_header,
- // 'table_header_acl2'
=> $table_header,
- // 'values_acl2'
=> $content,
+ // 'table_header_acl'
=> $table_header,
+ // 'values_acl'
=> $content,
'values_groups'
=> (isset($groups)?$groups:''),
'values_users'
=> (isset($users)?$users:''),
'lang_groups'
=> lang('groups'),
@@ -536,7 +537,7 @@
'lang_no_location'
=> lang('No location'),
'lang_location_statustext'
=> lang('Select submodule'),
'select_name_location'
=> 'module',
- 'location_list'
=> $this->bo->select_location('filter',$this->location,False)
+ 'location_list'
=> $this->bopreferences->select_location('filter',$this->location,False)
);
$appname = lang('permission');
@@ -709,6 +710,5 @@
// $GLOBALS['phpgw']->xslttpl->pp();
$this->save_sessiondata();
}
-
}
?>
Index: inc/class.uiadmin_custom.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_custom.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- inc/class.uiadmin_custom.inc.php 14 Sep 2006 17:40:38 -0000 1.6
+++ inc/class.uiadmin_custom.inc.php 5 Oct 2006 11:33:53 -0000 1.7
@@ -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.6 2006/09/14 17:40:38
sigurdne Exp $
+ * @version $Id: class.uiadmin_custom.inc.php,v 1.7 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -46,13 +46,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -84,7 +84,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -239,7 +239,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -357,7 +357,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
Index: inc/class.uiadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- inc/class.uiadmin_entity.inc.php 14 Sep 2006 13:53:52 -0000 1.21
+++ inc/class.uiadmin_entity.inc.php 5 Oct 2006 11:33:53 -0000 1.22
@@ -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.21 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uiadmin_entity.inc.php,v 1.22 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -54,13 +54,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location =
'.admin.entity';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -92,7 +92,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$this->bo->reset_fm_cache();
@@ -217,7 +217,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
$this->bo->reset_fm_cache();
@@ -340,7 +340,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
$entity_id =
get_var('entity_id',array('POST','GET'));
@@ -483,7 +483,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -614,7 +614,7 @@
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 4, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 4, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -710,7 +710,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$entity_id =
get_var('entity_id',array('POST','GET'));
@@ -835,7 +835,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$entity_id =
get_var('entity_id',array('POST','GET'));
@@ -933,7 +933,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
$entity_id = $this->entity_id;
@@ -1084,7 +1084,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$entity_id =
get_var('entity_id',array('POST','GET'));
@@ -1293,7 +1293,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
$entity_id = $this->entity_id;
@@ -1440,7 +1440,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$entity_id =
get_var('entity_id',array('POST','GET'));
Index: inc/class.uiadmin_location.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_location.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- inc/class.uiadmin_location.inc.php 3 Oct 2006 09:58:09 -0000 1.18
+++ inc/class.uiadmin_location.inc.php 5 Oct 2006 11:33:53 -0000 1.19
@@ -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.18 2006/10/03
09:58:09 sigurdne Exp $
+ * @version $Id: class.uiadmin_location.inc.php,v 1.19 2006/10/05
11:33:53 sigurdne Exp $
*/
/**
@@ -48,13 +48,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location =
'.admin.location';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -81,7 +81,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$this->bo->reset_fm_cache();
@@ -192,7 +192,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -277,7 +277,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$attrib = get_var('attrib',array('POST','GET'));
@@ -331,7 +331,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
$type_id =
get_var('type_id',array('POST','GET'));
@@ -468,7 +468,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$type_id =
get_var('type_id',array('POST','GET'));
@@ -662,7 +662,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array(
@@ -755,7 +755,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 16, 'acl_location'=>
$this->acl_location));
}
$column_name =
get_var('column_name',array('POST','GET'));
Index: inc/class.uiagreement.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiagreement.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- inc/class.uiagreement.inc.php 13 Sep 2006 12:56:22 -0000 1.24
+++ inc/class.uiagreement.inc.php 5 Oct 2006 11:33:53 -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 agreement
- * @version $Id: class.uiagreement.inc.php,v 1.24 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uiagreement.inc.php,v 1.25 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -58,14 +58,14 @@
$this->cats =
CreateObject('phpgwapi.categories');
$this->cats->app_name = 'fm_vendor';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.pricebook';
+ $this->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location = '.pricebook';
- $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->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -151,7 +151,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$file_name =
urldecode(get_var('file_name',array('POST','GET')));
@@ -190,7 +190,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('agreement',
@@ -857,7 +857,7 @@
}
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
-
'acl_location'=>$this->acl2_location,
+
'acl_location'=>$this->acl_location,
'alarm_type'=> 'agreement',
'type' => 'form',
'text' => 'Email
notification',
@@ -1494,7 +1494,7 @@
'type' => 'view'));
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
-
'acl_location'=>$this->acl2_location,
+
'acl_location'=>$this->acl_location,
'alarm_type'=> 'agreement',
'type' => 'view',
'text' => 'Email
notification',
Index: inc/class.uiasync.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiasync.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uiasync.inc.php 14 Sep 2006 17:40:38 -0000 1.14
+++ inc/class.uiasync.inc.php 5 Oct 2006 11:33:53 -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.uiasync.inc.php,v 1.14 2006/09/14 17:40:38
sigurdne Exp $
+ * @version $Id: class.uiasync.inc.php,v 1.15 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -43,13 +43,13 @@
$this->bo =
CreateObject($this->currentapp.'.boasync',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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -59,7 +59,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
}
Index: inc/class.uib_account.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uib_account.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uib_account.inc.php 13 Sep 2006 12:56:22 -0000 1.14
+++ inc/class.uib_account.inc.php 5 Oct 2006 11:33:53 -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.uib_account.inc.php,v 1.14 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uib_account.inc.php,v 1.15 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -46,12 +46,12 @@
$this->menu =
CreateObject($this->currentapp.'.menu');
$this->menu->sub ='invoice';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.b_account';
- $this->acl_read =
$this->acl2->check('.b_account',1);
- $this->acl_add =
$this->acl2->check('.b_account',2);
- $this->acl_edit =
$this->acl2->check('.b_account',4);
- $this->acl_delete =
$this->acl2->check('.b_account',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.b_account';
+ $this->acl_read =
$this->acl->check('.b_account',1);
+ $this->acl_add =
$this->acl->check('.b_account',2);
+ $this->acl_edit =
$this->acl->check('.b_account',4);
+ $this->acl_delete =
$this->acl->check('.b_account',8);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -77,7 +77,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('b_account','nextmatchs','menu',
@@ -188,7 +188,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -281,7 +281,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
Index: inc/class.uibudget.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uibudget.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.uibudget.inc.php 13 Sep 2006 12:56:22 -0000 1.20
+++ inc/class.uibudget.inc.php 5 Oct 2006 11:33:53 -0000 1.21
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage budget
- * @version $Id: class.uibudget.inc.php,v 1.20 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uibudget.inc.php,v 1.21 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -64,7 +64,7 @@
$this->menu->sub ='budget';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl = CreateObject('phpgwapi.acl');
}
@@ -85,18 +85,18 @@
function index()
{
- $acl2_location = '.budget';
- $acl_read = $this->acl2->check($acl2_location,1);
- $acl_add = $this->acl2->check($acl2_location,2);
- $acl_edit = $this->acl2->check($acl2_location,4);
- $acl_delete = $this->acl2->check($acl2_location,8);
+ $acl_location = '.budget';
+ $acl_read = $this->acl->check($acl_location,1);
+ $acl_add = $this->acl->check($acl_location,2);
+ $acl_edit = $this->acl->check($acl_location,4);
+ $acl_delete = $this->acl->check($acl_location,8);
$revision_list =
$this->bo->get_revision_filter_list($this->revision); // reset year
$this->year = $this->bo->year;
$this->revision = $this->bo->revision;
if(!$acl_read)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('budget',
@@ -290,18 +290,18 @@
function basis()
{
- $acl2_location = '.budget';
- $acl_read = $this->acl2->check($acl2_location,1);
- $acl_add = $this->acl2->check($acl2_location,2);
- $acl_edit = $this->acl2->check($acl2_location,4);
- $acl_delete = $this->acl2->check($acl2_location,8);
+ $acl_location = '.budget';
+ $acl_read = $this->acl->check($acl_location,1);
+ $acl_add = $this->acl->check($acl_location,2);
+ $acl_edit = $this->acl->check($acl_location,4);
+ $acl_delete = $this->acl->check($acl_location,8);
$revision_list =
$this->bo->get_revision_filter_list($this->revision,$basis=true); // reset year
$this->year = $this->bo->year;
$this->revision = $this->bo->revision;
if(!$acl_read)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('budget',
@@ -493,15 +493,15 @@
function obligations()
{
- $acl2_location = '.budget.obligations';
- $acl_read = $this->acl2->check($acl2_location,1);
- $acl_add = $this->acl2->check($acl2_location,2);
- $acl_edit = $this->acl2->check($acl2_location,4);
- $acl_delete = $this->acl2->check($acl2_location,8);
+ $acl_location = '.budget.obligations';
+ $acl_read = $this->acl->check($acl_location,1);
+ $acl_add = $this->acl->check($acl_location,2);
+ $acl_edit = $this->acl->check($acl_location,4);
+ $acl_delete = $this->acl->check($acl_location,8);
if(!$acl_read)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('budget',
@@ -656,13 +656,13 @@
function edit()
{
- $acl2_location = '.budget';
- $acl_add = $this->acl2->check($acl2_location,2);
- $acl_edit = $this->acl2->check($acl2_location,4);
+ $acl_location = '.budget';
+ $acl_add = $this->acl->check($acl_location,2);
+ $acl_edit = $this->acl->check($acl_location,4);
if(!$acl_add && !$acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$acl_location));
}
$budget_id =
get_var('budget_id',array('POST','GET'));
@@ -803,13 +803,13 @@
function edit_basis()
{
- $acl2_location = '.budget';
- $acl_add = $this->acl2->check($acl2_location,2);
- $acl_edit = $this->acl2->check($acl2_location,4);
+ $acl_location = '.budget';
+ $acl_add = $this->acl->check($acl_location,2);
+ $acl_edit = $this->acl->check($acl_location,4);
if(!$acl_add && !$acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$acl_location));
}
$budget_id =
get_var('budget_id',array('POST','GET'));
Index: inc/class.uicategory.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uicategory.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.uicategory.inc.php 14 Sep 2006 13:53:52 -0000 1.12
+++ inc/class.uicategory.inc.php 5 Oct 2006 11:33:53 -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.uicategory.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uicategory.inc.php,v 1.13 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -43,13 +43,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -76,7 +76,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -179,7 +179,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -266,7 +266,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
Index: inc/class.uicustom.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uicustom.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uicustom.inc.php 13 Sep 2006 18:29:16 -0000 1.14
+++ inc/class.uicustom.inc.php 5 Oct 2006 11:33:53 -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 custom
- * @version $Id: class.uicustom.inc.php,v 1.14 2006/09/13 18:29:16
sigurdne Exp $
+ * @version $Id: class.uicustom.inc.php,v 1.15 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -55,12 +55,12 @@
$this->allrows = $this->bo->allrows;
$this->menu->sub ='custom';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.custom';
- $this->acl_read =
$this->acl2->check('.custom',1);
- $this->acl_add =
$this->acl2->check('.custom',2);
- $this->acl_edit =
$this->acl2->check('.custom',4);
- $this->acl_delete =
$this->acl2->check('.custom',8);
+ $this->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location = '.custom';
+ $this->acl_read =
$this->acl->check('.custom',1);
+ $this->acl_add =
$this->acl->check('.custom',2);
+ $this->acl_edit =
$this->acl->check('.custom',4);
+ $this->acl_delete =
$this->acl->check('.custom',8);
}
@@ -291,7 +291,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$custom_id =
get_var('custom_id',array('POST','GET'));
Index: inc/class.uidocument.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- inc/class.uidocument.inc.php 13 Sep 2006 18:29:16 -0000 1.15
+++ inc/class.uidocument.inc.php 5 Oct 2006 11:33:53 -0000 1.16
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage document
- * @version $Id: class.uidocument.inc.php,v 1.15 2006/09/13 18:29:16
sigurdne Exp $
+ * @version $Id: class.uidocument.inc.php,v 1.16 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -52,12 +52,12 @@
$this->config =
CreateObject('phpgwapi.config',$this->currentapp);
$this->boadmin_entity =
CreateObject($this->currentapp.'.boadmin_entity');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.document';
- $this->acl_read =
$this->acl2->check('.document',1);
- $this->acl_add =
$this->acl2->check('.document',2);
- $this->acl_edit =
$this->acl2->check('.document',4);
- $this->acl_delete =
$this->acl2->check('.document',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.document';
+ $this->acl_read =
$this->acl->check('.document',1);
+ $this->acl_add =
$this->acl->check('.document',2);
+ $this->acl_edit =
$this->acl->check('.document',4);
+ $this->acl_delete =
$this->acl->check('.document',8);
$this->rootdir =
$this->bo->rootdir;
$this->fakebase =
$this->bo->fakebase;
@@ -97,7 +97,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('document','values','table_header',
@@ -316,7 +316,7 @@
'lang_user_statustext'
=> lang('Select the user the document belongs to. To do not use a category
select NO USER'),
'select_user_name'
=> 'filter',
'lang_no_user'
=> lang('No user'),
- 'user_list'
=>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
+ 'user_list'
=>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl_location,array('all'),$default=$this->account),
'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'),
@@ -341,7 +341,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$preserve = get_var('preserve',array('POST','GET'));
@@ -578,7 +578,7 @@
'lang_user_statustext'
=> lang('Select the user the document belongs to. To do not use a category
select NO USER'),
'select_user_name'
=> 'filter',
'lang_no_user'
=> lang('No user'),
- 'user_list'
=>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
+ 'user_list'
=>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl_location,array('all'),$default=$this->account),
'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'),
@@ -609,7 +609,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$document_id =
get_var('document_id',array('POST','GET'));
@@ -658,7 +658,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$from =
get_var('from',array('POST','GET'));
@@ -979,7 +979,7 @@
'lang_user_statustext'
=> lang('Select the coordinator the document belongs to. To do not use a
category select NO USER'),
'select_user_name'
=> 'values[coordinator]',
'lang_no_user'
=> lang('Select coordinator'),
- 'user_list'
=>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl2_location),
+ 'user_list'
=>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl_location),
'status_list'
=> $this->bo->select_status_list('select',$values['status']),
'status_name'
=> 'values[status]',
@@ -1006,7 +1006,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$location_code =
get_var('location_code',array('POST','GET'));
@@ -1053,7 +1053,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$from = get_var('from',array('POST','GET'));
Index: inc/class.uientity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- inc/class.uientity.inc.php 2 Oct 2006 09:28:31 -0000 1.28
+++ inc/class.uientity.inc.php 5 Oct 2006 11:33:53 -0000 1.29
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage entity
- * @version $Id: class.uientity.inc.php,v 1.28 2006/10/02 09:28:31
sigurdne Exp $
+ * @version $Id: class.uientity.inc.php,v 1.29 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -56,19 +56,19 @@
$this->entity_id =
$this->bo->entity_id;
$this->cat_id =
$this->bo->cat_id;
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl =
CreateObject('phpgwapi.acl');
if(!$this->cat_id)
{
- $this->acl2_location = '.entity.' .
$this->entity_id;
+ $this->acl_location = '.entity.' .
$this->entity_id;
}
else
{
- $this->acl2_location = '.entity.' .
$this->entity_id . '.' . $this->cat_id;
+ $this->acl_location = '.entity.' .
$this->entity_id . '.' . $this->cat_id;
}
- $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_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -220,7 +220,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$file_name =
urldecode(get_var('file_name',array('POST','GET')));
@@ -258,7 +258,7 @@
{
if(!$this->acl_read && $this->cat_id)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('entity',
@@ -519,7 +519,7 @@
'lang_user_statustext' =>
lang('Select the user. To do not use a category select NO USER'),
'select_user_name' =>
'filter',
'lang_no_user' =>
lang('No user'),
- 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl2_location,array('all'),$default='all'),
+ 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl_location,array('all'),$default='all'),
'lang_filter_statustext' =>
lang('Select the filter. To show all entries select SHOW ALL'),
'lang_searchfield_statustext' =>
lang('Enter the search string. To show all entries, empty this field and press
the SUBMIT button again'),
@@ -554,7 +554,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$config =
CreateObject('phpgwapi.config',$this->currentapp);
@@ -1018,7 +1018,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -1062,7 +1062,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$config =
CreateObject('phpgwapi.config',$this->currentapp);
Index: inc/class.uigab.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uigab.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- inc/class.uigab.inc.php 12 Sep 2006 08:54:08 -0000 1.21
+++ inc/class.uigab.inc.php 5 Oct 2006 11:33:53 -0000 1.22
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.uigab.inc.php,v 1.21 2006/09/12 08:54:08 sigurdne
Exp $
+ * @version $Id: class.uigab.inc.php,v 1.22 2006/10/05 11:33:53 sigurdne
Exp $
*/
/**
@@ -51,12 +51,12 @@
$this->bolocation =
CreateObject($this->currentapp.'.bolocation');
$this->config =
CreateObject('phpgwapi.config');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.location';
- $this->acl_read =
$this->acl2->check('.location',1);
- $this->acl_add =
$this->acl2->check('.location',2);
- $this->acl_edit =
$this->acl2->check('.location',4);
- $this->acl_delete =
$this->acl2->check('.location',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.location';
+ $this->acl_read =
$this->acl->check('.location',1);
+ $this->acl_add =
$this->acl->check('.location',2);
+ $this->acl_edit =
$this->acl->check('.location',4);
+ $this->acl_delete =
$this->acl->check('.location',8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -98,7 +98,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>1, 'acl_location'=>
$this->acl_location));
}
$gab_list =
$this->bo->read($location_code,$gaards_nr,$bruksnr,$feste_nr,$seksjons_nr,$address,$check_payments,$allrows=True);
@@ -161,7 +161,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('gab',
@@ -461,7 +461,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('gab','values','table_header',
@@ -689,7 +689,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl_location));
}
$from =
get_var('from',array('POST','GET'));
@@ -866,7 +866,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$gab_id = get_var('gab_id',array('POST','GET'));
@@ -910,7 +910,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$gab_id =
get_var('gab_id',array('POST','GET'));
Index: inc/class.uiinvestment.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiinvestment.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uiinvestment.inc.php 13 Sep 2006 12:56:22 -0000 1.14
+++ inc/class.uiinvestment.inc.php 5 Oct 2006 11:33:53 -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 eco
- * @version $Id: class.uiinvestment.inc.php,v 1.14 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uiinvestment.inc.php,v 1.15 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -46,12 +46,12 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
$this->bolocation =
CreateObject($this->currentapp.'.bolocation');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.invoice';
- $this->acl_read =
$this->acl2->check('.invoice',1);
- $this->acl_add =
$this->acl2->check('.invoice',2);
- $this->acl_edit =
$this->acl2->check('.invoice',4);
- $this->acl_delete =
$this->acl2->check('.invoice',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.invoice';
+ $this->acl_read =
$this->acl->check('.invoice',1);
+ $this->acl_add =
$this->acl->check('.invoice',2);
+ $this->acl_edit =
$this->acl->check('.invoice',4);
+ $this->acl_delete =
$this->acl->check('.invoice',8);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -61,7 +61,7 @@
$this->cat_id = $this->bo->cat_id;
$this->part_of_town_id =
$this->bo->part_of_town_id;
$this->allrows = $this->bo->allrows;
- $this->admin_invoice =
$this->acl2->check('.invoice',16);
+ $this->admin_invoice =
$this->acl->check('.invoice',16);
$this->menu->sub ='invoice';
}
@@ -85,7 +85,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('investment',
@@ -475,7 +475,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$values =
get_var('values',array('POST'));
$values['date'] =
get_var('date',array('POST'));
Index: inc/class.uiinvoice.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiinvoice.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- inc/class.uiinvoice.inc.php 19 Sep 2006 10:26:25 -0000 1.39
+++ inc/class.uiinvoice.inc.php 5 Oct 2006 11:33:53 -0000 1.40
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage eco
- * @version $Id: class.uiinvoice.inc.php,v 1.39 2006/09/19 10:26:25
sigurdne Exp $
+ * @version $Id: class.uiinvoice.inc.php,v 1.40 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -66,13 +66,13 @@
$this->allrows = $this->bo->allrows;
$this->district_id =
$this->bo->district_id;
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
+ $this->acl =
CreateObject('phpgwapi.acl');
- $this->acl2_location = '.invoice';
- $this->acl_read =
$this->acl2->check('.invoice',1);
- $this->acl_add =
$this->acl2->check('.invoice',2);
- $this->acl_edit =
$this->acl2->check('.invoice',4);
- $this->acl_delete =
$this->acl2->check('.invoice',8);
+ $this->acl_location = '.invoice';
+ $this->acl_read =
$this->acl->check('.invoice',1);
+ $this->acl_add =
$this->acl->check('.invoice',2);
+ $this->acl_edit =
$this->acl->check('.invoice',4);
+ $this->acl_delete =
$this->acl->check('.invoice',8);
$this->menu->sub ='invoice';
}
@@ -180,7 +180,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('invoice','menu',
@@ -962,7 +962,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$voucher_id = get_var('voucher_id',array('POST','GET'));
@@ -1004,7 +1004,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$receipt =
$GLOBALS['phpgw']->session->appsession('session_data','add_receipt');
@@ -1353,7 +1353,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw_info']['flags'][noheader] = True;
Index: inc/class.uilocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- inc/class.uilocation.inc.php 3 Oct 2006 09:58:09 -0000 1.35
+++ inc/class.uilocation.inc.php 5 Oct 2006 11:33:53 -0000 1.36
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage location
- * @version $Id: class.uilocation.inc.php,v 1.35 2006/10/03 09:58:09
sigurdne Exp $
+ * @version $Id: class.uilocation.inc.php,v 1.36 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -50,12 +50,12 @@
$this->menu =
CreateObject($this->currentapp.'.menu');
$this->soadmin_location =
CreateObject($this->currentapp.'.soadmin_location');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.location';
- $this->acl_read =
$this->acl2->check('.location',1);
- $this->acl_add =
$this->acl2->check('.location',2);
- $this->acl_edit =
$this->acl2->check('.location',4);
- $this->acl_delete =
$this->acl2->check('.location',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.location';
+ $this->acl_read =
$this->acl->check('.location',1);
+ $this->acl_add =
$this->acl->check('.location',2);
+ $this->acl_edit =
$this->acl->check('.location',4);
+ $this->acl_delete =
$this->acl->check('.location',8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -120,7 +120,7 @@
$GLOBALS['phpgw']->redirect_link('/index.php',array(
'menuaction'=> $this->currentapp.'.uilocation.stop',
'perm'=>1,
-
'acl_location'=> $this->acl2_location
+
'acl_location'=> $this->acl_location
)
);
}
@@ -497,7 +497,7 @@
$GLOBALS['phpgw']->redirect_link('/index.php',array(
'menuaction'=> $this->currentapp.'.uilocation.stop',
'perm'=>2,
-
'acl_location'=>$this->acl2_location
+
'acl_location'=>$this->acl_location
)
);
}
@@ -1048,7 +1048,7 @@
$GLOBALS['phpgw']->redirect_link('/index.php',array(
'menuaction' => $this->currentapp.'.uilocation.stop',
'perm'
=> 8,
-
'acl_location' => $this->acl2_location
+
'acl_location' => $this->acl_location
)
);
}
@@ -1099,7 +1099,7 @@
$GLOBALS['phpgw']->redirect_link('/index.php',array(
'menuaction' => $this->currentapp.'.uilocation.stop',
'perm'
=> 1,
-
'acl_location' => $this->acl2_location
+
'acl_location' => $this->acl_location
)
);
}
Index: inc/class.uimeter.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uimeter.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- inc/class.uimeter.inc.php 17 Jun 2006 08:45:56 -0000 1.11
+++ inc/class.uimeter.inc.php 5 Oct 2006 11:33:53 -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 entity
- * @version $Id: class.uimeter.inc.php,v 1.11 2006/06/17 08:45:56
sigurdne Exp $
+ * @version $Id: class.uimeter.inc.php,v 1.12 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -48,12 +48,12 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.meter';
- $this->acl_read =
$this->acl2->check('.meter',1);
- $this->acl_add =
$this->acl2->check('.meter',2);
- $this->acl_edit =
$this->acl2->check('.meter',4);
- $this->acl_delete =
$this->acl2->check('.meter',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.meter';
+ $this->acl_read =
$this->acl->check('.meter',1);
+ $this->acl_add =
$this->acl->check('.meter',2);
+ $this->acl_edit =
$this->acl->check('.meter',4);
+ $this->acl_delete =
$this->acl->check('.meter',8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -83,7 +83,7 @@
{
if(!$this->acl_read)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl2_location);
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl_location);
}
$GLOBALS['phpgw']->xslttpl->add_file(array('meter','values','table_header',
@@ -306,7 +306,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=2&acl_location='
. $this->acl2_location);
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=2&acl_location='
. $this->acl_location);
}
$bolocation =
CreateObject($this->currentapp.'.bolocation');
@@ -477,7 +477,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=8&acl_location='
. $this->acl2_location);
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=8&acl_location='
. $this->acl_location);
}
$id = get_var('id',array('POST','GET'));
@@ -519,7 +519,7 @@
{
if(!$this->acl_read)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl2_location);
+
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction='.$this->currentapp.'.uilocation.stop&perm=1&acl_location='
. $this->acl_location);
}
$bolocation =
CreateObject($this->currentapp.'.bolocation');
Index: inc/class.uip_of_town.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uip_of_town.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.uip_of_town.inc.php 14 Sep 2006 13:53:52 -0000 1.12
+++ inc/class.uip_of_town.inc.php 5 Oct 2006 11:33:53 -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.uip_of_town.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uip_of_town.inc.php,v 1.13 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -45,13 +45,13 @@
$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->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -81,7 +81,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('p_of_town',
@@ -226,7 +226,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$part_of_town_id =
get_var('part_of_town_id',array('POST','GET'));
@@ -317,7 +317,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$part_of_town_id =
get_var('part_of_town_id',array('POST','GET'));
@@ -360,7 +360,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$part_of_town_id =
get_var('part_of_town_id',array('GET'));
Index: inc/class.uipricebook.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uipricebook.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- inc/class.uipricebook.inc.php 13 Sep 2006 12:56:22 -0000 1.18
+++ inc/class.uipricebook.inc.php 5 Oct 2006 11:33:53 -0000 1.19
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage agreement
- * @version $Id: class.uipricebook.inc.php,v 1.18 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uipricebook.inc.php,v 1.19 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -55,13 +55,13 @@
$this->contacts =
CreateObject($this->currentapp.'.soactor');
$this->contacts->role = 'vendor';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.pricebook';
- $this->acl_read =
$this->acl2->check('.pricebook',1);
- $this->acl_add =
$this->acl2->check('.pricebook',2);
- $this->acl_edit =
$this->acl2->check('.pricebook',4);
- $this->acl_delete =
$this->acl2->check('.pricebook',8);
- $this->acl_manage =
$this->acl2->check('.pricebook',16);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.pricebook';
+ $this->acl_read =
$this->acl->check('.pricebook',1);
+ $this->acl_add =
$this->acl->check('.pricebook',2);
+ $this->acl_edit =
$this->acl->check('.pricebook',4);
+ $this->acl_delete =
$this->acl->check('.pricebook',8);
+ $this->acl_manage =
$this->acl->check('.pricebook',16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -113,7 +113,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,'');
@@ -314,7 +314,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,'');
@@ -433,7 +433,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$agreement_group_id =
get_var('agreement_group_id',array('POST','GET'));
@@ -563,7 +563,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('pricebook',
@@ -818,7 +818,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('pricebook',
@@ -959,7 +959,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->session->appsession('referer',$this->currentapp,'');
@@ -1097,7 +1097,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$activity_id =
get_var('activity_id',array('POST','GET'));
@@ -1258,7 +1258,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$method =
get_var('method',array('GET'));
Index: inc/class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- inc/class.uiproject.inc.php 1 Oct 2006 20:10:04 -0000 1.40
+++ inc/class.uiproject.inc.php 5 Oct 2006 11:33:53 -0000 1.41
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiproject.inc.php,v 1.40 2006/10/01 20:10:04
sigurdne Exp $
+ * @version $Id: class.uiproject.inc.php,v 1.41 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -51,12 +51,12 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.project';
- $this->acl_read =
$this->acl2->check('.project',1);
- $this->acl_add =
$this->acl2->check('.project',2);
- $this->acl_edit =
$this->acl2->check('.project',4);
- $this->acl_delete =
$this->acl2->check('.project',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.project';
+ $this->acl_read =
$this->acl->check('.project',1);
+ $this->acl_add =
$this->acl->check('.project',2);
+ $this->acl_edit =
$this->acl->check('.project',4);
+ $this->acl_delete =
$this->acl->check('.project',8);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -100,7 +100,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1,'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('project','values','table_header',
@@ -410,7 +410,7 @@
'lang_user_statustext' => lang('Select
the user the project belongs to. To do not use a category select NO USER'),
'select_user_name' => 'filter',
'lang_no_user' => lang('No
user'),
- 'user_list' =>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
+ 'user_list' =>
$this->bocommon->get_user_list_right2('filter',4,$this->filter,$this->acl_location,array('all'),$default=$this->account),
'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'),
@@ -490,7 +490,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$id =
get_var('id',array('POST','GET'));
$values =
get_var('values',array('POST'));
@@ -1055,7 +1055,7 @@
'lang_user_statustext'
=> lang('Select the coordinator the project belongs to. To do not use a
category select NO USER'),
'select_user_name'
=> 'values[coordinator]',
'lang_no_user'
=> lang('Select coordinator'),
- 'user_list'
=>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl2_location),
+ 'user_list'
=>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl_location),
'status_list'
=> $this->bo->select_status_list('select',$values['status']),
'status_name'
=> 'values[status]',
@@ -1102,7 +1102,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8,
'acl_location'=>$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8,
'acl_location'=>$this->acl_location));
}
$project_id = get_var('project_id',array('POST','GET'));
@@ -1145,7 +1145,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$receipt =
$GLOBALS['phpgw']->session->appsession('receipt',$this->currentapp);
Index: inc/class.uir_agreement.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uir_agreement.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- inc/class.uir_agreement.inc.php 13 Sep 2006 12:56:22 -0000 1.17
+++ inc/class.uir_agreement.inc.php 5 Oct 2006 11:33:53 -0000 1.18
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage agreement
- * @version $Id: class.uir_agreement.inc.php,v 1.17 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uir_agreement.inc.php,v 1.18 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -59,14 +59,14 @@
$this->cats =
CreateObject('phpgwapi.categories');
$this->cats->app_name = 'fm_tenant';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location= '.r_agreement';
+ $this->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location= '.r_agreement';
- $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->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -151,7 +151,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw_info']['flags'][noheader] = True;
@@ -192,7 +192,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('r_agreement',
@@ -803,7 +803,7 @@
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
-
'acl_location'=>$this->acl2_location,
+
'acl_location'=>$this->acl_location,
'alarm_type'=> 'r_agreement',
'type' => 'form',
'text' => 'Email
notification',
@@ -1531,7 +1531,7 @@
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
-
'acl_location'=>$this->acl2_location,
+
'acl_location'=>$this->acl_location,
'alarm_type'=> 'r_agreement',
'type' => 'view',
'text' => 'Email
notification',
Index: inc/class.uirequest.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uirequest.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- inc/class.uirequest.inc.php 18 Sep 2006 13:11:35 -0000 1.25
+++ inc/class.uirequest.inc.php 5 Oct 2006 11:33:53 -0000 1.26
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uirequest.inc.php,v 1.25 2006/09/18 13:11:35
sigurdne Exp $
+ * @version $Id: class.uirequest.inc.php,v 1.26 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -53,13 +53,13 @@
$this->bolocation =
CreateObject($this->currentapp.'.bolocation');
$this->config =
CreateObject('phpgwapi.config');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.project';
- $this->acl_read =
$this->acl2->check('.project',1);
- $this->acl_add =
$this->acl2->check('.project',2);
- $this->acl_edit =
$this->acl2->check('.project',4);
- $this->acl_delete =
$this->acl2->check('.project',8);
- $this->acl_manage =
$this->acl2->check('.project',16);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.project';
+ $this->acl_read =
$this->acl->check('.project',1);
+ $this->acl_add =
$this->acl->check('.project',2);
+ $this->acl_edit =
$this->acl->check('.project',4);
+ $this->acl_delete =
$this->acl->check('.project',8);
+ $this->acl_manage =
$this->acl->check('.project',16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -98,7 +98,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$file_name =
urldecode(get_var('file_name',array('POST','GET')));
@@ -144,7 +144,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('request','table_header',
@@ -482,7 +482,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>16, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('request'));
$GLOBALS['phpgw_info']['flags'][noheader] = True;
@@ -523,7 +523,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
$values = get_var('values',array('POST'));
@@ -979,7 +979,7 @@
'lang_user_statustext' =>
lang('Select the coordinator the request belongs to. To do not use a category
select NO USER'),
'select_user_name' =>
'values[coordinator]',
'lang_no_user' =>
lang('Select coordinator'),
- 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl2_location),
+ 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl_location),
'status_list' =>
$this->boproject->select_status_list('select',$values['status']),
'status_name' =>
'values[status]',
@@ -1018,7 +1018,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
@@ -1060,7 +1060,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
Index: inc/class.uis_agreement.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uis_agreement.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- inc/class.uis_agreement.inc.php 13 Sep 2006 12:56:22 -0000 1.30
+++ inc/class.uis_agreement.inc.php 5 Oct 2006 11:33:53 -0000 1.31
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage agreement
- * @version $Id: class.uis_agreement.inc.php,v 1.30 2006/09/13 12:56:22
sigurdne Exp $
+ * @version $Id: class.uis_agreement.inc.php,v 1.31 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -57,14 +57,14 @@
$this->cats =
CreateObject('phpgwapi.categories');
$this->cats->app_name = 'fm_vendor';
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location= '.s_agreement';
+ $this->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location= '.s_agreement';
- $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->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -147,7 +147,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw_info']['flags'][noheader] = True;
@@ -188,7 +188,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('s_agreement',
@@ -705,7 +705,7 @@
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
-
'acl_location'=>$this->acl2_location,
+
'acl_location'=>$this->acl_location,
'alarm_type' =>
's_agreement',
'type' => 'form',
'text' => 'Email
notification',
@@ -1351,7 +1351,7 @@
$alarm_data=$this->bocommon->initiate_ui_alarm(array(
- 'acl_location'
=>$this->acl2_location,
+ 'acl_location'
=>$this->acl_location,
'alarm_type' =>
's_agreement',
'type' => 'view',
'text' => 'Email
notification',
Index: inc/class.uistandard_2.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uistandard_2.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- inc/class.uistandard_2.inc.php 14 Sep 2006 13:53:52 -0000 1.12
+++ inc/class.uistandard_2.inc.php 5 Oct 2006 11:33:53 -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.uistandard_2.inc.php,v 1.12 2006/09/14 13:53:52
sigurdne Exp $
+ * @version $Id: class.uistandard_2.inc.php,v 1.13 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -43,13 +43,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -75,7 +75,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -176,7 +176,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -256,7 +256,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
Index: inc/class.uistandard_3.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uistandard_3.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- inc/class.uistandard_3.inc.php 14 Sep 2006 17:40:38 -0000 1.13
+++ inc/class.uistandard_3.inc.php 5 Oct 2006 11:33:53 -0000 1.14
@@ -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.13 2006/09/14 17:40:38
sigurdne Exp $
+ * @version $Id: class.uistandard_3.inc.php,v 1.14 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -43,13 +43,13 @@
$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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.admin';
+ $this->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -75,7 +75,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -176,7 +176,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
@@ -253,7 +253,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 8, 'acl_location'=>
$this->acl_location));
}
$type = get_var('type',array('POST','GET'));
Index: inc/class.uitenant_claim.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uitenant_claim.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/class.uitenant_claim.inc.php 12 Sep 2006 13:09:02 -0000 1.14
+++ inc/class.uitenant_claim.inc.php 5 Oct 2006 11:33:53 -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 project
- * @version $Id: class.uitenant_claim.inc.php,v 1.14 2006/09/12 13:09:02
sigurdne Exp $
+ * @version $Id: class.uitenant_claim.inc.php,v 1.15 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -47,14 +47,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.tenant_claim';
+ $this->acl = CreateObject('phpgwapi.acl');
+ $this->acl_location = '.tenant_claim';
- $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->acl_read =
$this->acl->check($this->acl_location,1);
+ $this->acl_add =
$this->acl->check($this->acl_location,2);
+ $this->acl_edit =
$this->acl->check($this->acl_location,4);
+ $this->acl_delete =
$this->acl->check($this->acl_location,8);
+ $this->acl_manage =
$this->acl->check($this->acl_location,16);
$this->start = $this->bo->start;
$this->query = $this->bo->query;
@@ -92,7 +92,7 @@
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
@@ -314,7 +314,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$claim_id = get_var('claim_id',array('POST','GET'));
@@ -593,7 +593,7 @@
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>8, 'acl_location'=>
$this->acl_location));
}
@@ -637,7 +637,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$claim_id =
get_var('claim_id',array('POST','GET'));
Index: inc/class.uitts.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- inc/class.uitts.inc.php 26 Sep 2006 18:29:27 -0000 1.43
+++ inc/class.uitts.inc.php 5 Oct 2006 11:33:53 -0000 1.44
@@ -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.43 2006/09/26 18:29:27 sigurdne
Exp $
+ * @version $Id: class.uitts.inc.php,v 1.44 2006/10/05 11:33:53 sigurdne
Exp $
*/
/**
@@ -38,14 +38,14 @@
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $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->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.ticket';
+ $this->acl_read =
$this->acl->check('.ticket',1);
+ $this->acl_add =
$this->acl->check('.ticket',2);
+ $this->acl_edit =
$this->acl->check('.ticket',4);
+ $this->acl_delete =
$this->acl->check('.ticket',8);
+ $this->acl_manage =
$this->acl->check('.ticket',16);
+ $this->bo->acl_location =
$this->acl_location;
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -161,14 +161,14 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 1, 'acl_location'=>
$this->acl_location));
}
if(get_var('edit_status',array('POST','GET')))
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=> 4, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=> 4, 'acl_location'=>
$this->acl_location));
}
$new_status =
get_var('new_status',array('POST','GET'));
@@ -552,7 +552,7 @@
'lang_user_statustext' =>
lang('Assigned to'),
'select_user_name' =>
'user_filter',
'lang_no_user' =>
lang('No user'),
- 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->user_filter,$this->acl2_location,'',$default='')
+ 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->user_filter,$this->acl_location,'',$default='')
);
$appname =
lang('helpdesk');
@@ -568,7 +568,7 @@
{
if(!$this->acl_add)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=> 2, 'acl_location'=>
$this->acl_location));
}
$bolocation =
CreateObject($this->currentapp.'.bolocation');
@@ -733,7 +733,7 @@
'lang_no_user' =>
lang('Select user'),
'lang_user_statustext' =>
lang('Select the user the selection belongs to. To do not use a user select NO
USER'),
'select_user_name' =>
'values[assignedto]',
- 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$values['assignedto'],$this->acl2_location),
+ 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$values['assignedto'],$this->acl_location),
'lang_group' =>
lang('Group'),
'lang_no_group' =>
lang('No group'),
@@ -791,7 +791,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$bolocation =
CreateObject($this->currentapp.'.bolocation');
@@ -806,11 +806,11 @@
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>4, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>4, 'acl_location'=>
$this->acl_location));
}
$so2 =
CreateObject($this->currentapp.'.sotts2');
- $so2->acl_location = $this->acl2_location;
+ $so2->acl_location = $this->acl_location;
$receipt = $so2->update_ticket($values,$id);
}
@@ -1019,7 +1019,7 @@
'lang_no_user' =>
lang('Select user'),
'lang_user_statustext' =>
lang('Select the user the selection belongs to. To do not use a user select NO
USER'),
'select_user_name' =>
'values[assignedto]',
- 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$ticket['assignedto'],$this->acl2_location),
+ 'user_list' =>
$this->bocommon->get_user_list_right2('select',4,$ticket['assignedto'],$this->acl_location),
'lang_group' =>
lang('Group'),
'lang_no_group' =>
lang('No group'),
Index: inc/class.uiwo_hour.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- inc/class.uiwo_hour.inc.php 12 Sep 2006 13:09:02 -0000 1.28
+++ inc/class.uiwo_hour.inc.php 5 Oct 2006 11:33:53 -0000 1.29
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiwo_hour.inc.php,v 1.28 2006/09/12 13:09:02
sigurdne Exp $
+ * @version $Id: class.uiwo_hour.inc.php,v 1.29 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -61,12 +61,12 @@
$this->config->read_repository();
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.project';
- $this->acl_read =
$this->acl2->check('.project',1);
- $this->acl_add =
$this->acl2->check('.project',2);
- $this->acl_edit =
$this->acl2->check('.project',4);
- $this->acl_delete =
$this->acl2->check('.project',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.project';
+ $this->acl_read =
$this->acl->check('.project',1);
+ $this->acl_add =
$this->acl->check('.project',2);
+ $this->acl_edit =
$this->acl->check('.project',4);
+ $this->acl_delete =
$this->acl->check('.project',8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -499,7 +499,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour','menu'));
@@ -586,7 +586,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour','menu'));
@@ -909,7 +909,7 @@
$pdf =
CreateObject('phpgwapi.pdf');
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$show_cost = get_var('show_cost',array('POST','GET'));
$mark_draft = get_var('mark_draft',array('POST','GET'));
@@ -1032,7 +1032,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
@@ -1236,7 +1236,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('wo_hour',
@@ -1473,7 +1473,7 @@
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$from =
get_var('from',array('POST','GET'));
$template_id =
get_var('template_id',array('POST','GET'));
@@ -1650,7 +1650,7 @@
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop', 'perm'=>2, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
$workorder_id =
get_var('workorder_id',array('POST','GET'));
Index: inc/class.uiworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiworkorder.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- inc/class.uiworkorder.inc.php 1 Oct 2006 20:10:04 -0000 1.31
+++ inc/class.uiworkorder.inc.php 5 Oct 2006 11:33:53 -0000 1.32
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage project
- * @version $Id: class.uiworkorder.inc.php,v 1.31 2006/10/01 20:10:04
sigurdne Exp $
+ * @version $Id: class.uiworkorder.inc.php,v 1.32 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -49,12 +49,12 @@
$this->bo =
CreateObject($this->currentapp.'.boworkorder',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon');
$this->menu =
CreateObject($this->currentapp.'.menu');
- $this->acl2 =
CreateObject($this->currentapp.'.acl2');
- $this->acl2_location = '.project';
- $this->acl_read =
$this->acl2->check('.project',1);
- $this->acl_add =
$this->acl2->check('.project',2);
- $this->acl_edit =
$this->acl2->check('.project',4);
- $this->acl_delete =
$this->acl2->check('.project',8);
+ $this->acl =
CreateObject('phpgwapi.acl');
+ $this->acl_location = '.project';
+ $this->acl_read =
$this->acl->check('.project',1);
+ $this->acl_add =
$this->acl->check('.project',2);
+ $this->acl_edit =
$this->acl->check('.project',4);
+ $this->acl_delete =
$this->acl->check('.project',8);
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
@@ -108,7 +108,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>1, 'acl_location'=>
$this->acl_location));
}
$GLOBALS['phpgw']->xslttpl->add_file(array('workorder','values','table_header',
@@ -449,7 +449,7 @@
'lang_user_statustext' =>
lang('Select the user the workorder belongs to. To do not use a category select
NO USER'),
'select_user_name' =>
'filter',
'lang_no_user' =>
lang('No user'),
- 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl2_location,array('all'),$default=$this->account),
+ 'user_list' =>
$this->bocommon->get_user_list_right2($group_filters,4,$this->filter,$this->acl_location,array('all'),$default=$this->account),
'lang_searchvendor_statustext' =>
lang('Enter the vendor name to search for'),
'lang_searchfield_statustext' =>
lang('Enter the search string. To show all entries, empty this field and press
the SUBMIT button again'),
@@ -475,7 +475,7 @@
{
if(!$this->acl_add && !$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl_location));
}
$boproject =
CreateObject($this->currentapp.'.boproject');
$bolocation =
CreateObject($this->currentapp.'.bolocation');
@@ -965,7 +965,7 @@
{
if(!$this->acl_edit)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>2, 'acl_location'=>
$this->acl_location));
}
$link_data = array
@@ -1004,7 +1004,7 @@
{
if(!$this->acl_delete)
{
-
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>8, 'acl_location'=>
$this->acl2_location));
+
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>8, 'acl_location'=>
$this->acl_location));
}
$id = get_var('id',array('POST','GET'));
$confirm = get_var('confirm',array('POST'));
@@ -1045,7 +1045,7 @@
{
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']->redirect_link('/index.php',array('menuaction'=>
$this->currentapp.'.uilocation.stop','perm'=>1, 'acl_location'=>
$this->acl_location));
}
$boproject =
CreateObject($this->currentapp.'.boproject');
Index: inc/hook_admin.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/hook_admin.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- inc/hook_admin.inc.php 9 Sep 2006 09:04:50 -0000 1.25
+++ inc/hook_admin.inc.php 5 Oct 2006 11:33:53 -0000 1.26
@@ -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: hook_admin.inc.php,v 1.25 2006/09/09 09:04:50 skwashd
Exp $
+ * @version $Id: hook_admin.inc.php,v 1.26 2006/10/05 11:33:53 sigurdne
Exp $
*/
{
@@ -41,7 +41,7 @@
'Building Part' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uistandard_2.index', 'type' => 'building_part') ),
'Tender chapter' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uicategory.index', 'type' => 'tender_chapter') ),
'ID Control' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiadmin.edit_id') ),
- 'Permissions' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiadmin.list_acl2') ),
+ 'Permissions' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiadmin.list_acl') ),
'User contact info' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uiadmin.contact_info') ),
'Request status' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uistandard_2.index', 'type' => 'request_status') ),
'Request condition_type' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'property.uicategory.index', 'type' => 'r_condition_type') ),
Index: setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/setup.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- setup/setup.inc.php 14 Sep 2006 13:53:52 -0000 1.44
+++ setup/setup.inc.php 5 Oct 2006 11:33:53 -0000 1.45
@@ -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.44 2006/09/14 13:53:52 sigurdne Exp $
+ * @version $Id: setup.inc.php,v 1.45 2006/10/05 11:33:53 sigurdne Exp $
*/
$setup_info['property']['name'] = 'property';
$setup_info['property']['title'] = 'Property';
- $setup_info['property']['version'] = '0.9.17.524';
+ $setup_info['property']['version'] = '0.9.17.525';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
@@ -148,7 +148,6 @@
'fm_ecologg',
'fm_ecomva',
'fm_ecouser',
- 'fm_acl2',
'fm_investment',
'fm_investment_value',
'fm_event_receipt',
@@ -157,7 +156,6 @@
'fm_document_category',
'fm_document_history',
'fm_document_status',
- 'fm_acl_location',
'fm_standard_unit',
'fm_owner',
'fm_owner_category',
Index: setup/tables_current.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/tables_current.inc.php,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- setup/tables_current.inc.php 3 Oct 2006 09:58:09 -0000 1.64
+++ setup/tables_current.inc.php 5 Oct 2006 11:33:53 -0000 1.65
@@ -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_current.inc.php,v 1.64 2006/10/03 09:58:09
sigurdne Exp $
+ * @version $Id: tables_current.inc.php,v 1.65 2006/10/05 11:33:53
sigurdne Exp $
*/
$phpgw_baseline = array(
@@ -1194,23 +1194,6 @@
'fk' => array(),
'uc' => array()
),
- 'fm_acl2' => array(
- 'fd' => array(
- 'acl_host' => array('type' => 'int','precision'
=> '4','default' => '0','nullable' => False),
- 'acl_appid' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => False),
- 'grantor' => array('type' => 'int','precision'
=> '4','nullable' => True),
- 'grantor_type' => array('type' =>
'char','precision' => '1','nullable' => True),
- 'acl_account' => array('type' =>
'int','precision' => '4','default' => '0','nullable' => False),
- 'acl_location' => array('type' =>
'varchar','precision' => '255','nullable' => False),
- 'acl_rights' => array('type' =>
'int','precision' => '4','default' => '','nullable' => True),
- 'acl_type' => array('type' => 'int','precision'
=> '2','default' => '0','nullable' => False),
- 'acl_data ' => array('type' =>
'text','nullable' => True)
- ),
- 'pk' => array(),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- ),
'fm_request_condition_type' => array(
'fd' => array(
'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
@@ -1384,17 +1367,6 @@
'ix' => array(),
'uc' => array()
),
- 'fm_acl_location' => array(
- 'fd' => array(
- 'id' => array('type' => 'varchar','precision'
=> '20','nullable' => False),
- 'descr' => array('type' =>
'varchar','precision' => '50','nullable' => False),
- 'allow_grant' => array('type' =>
'int','precision' => '4','nullable' => True)
- ),
- 'pk' => array('id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- ),
'fm_request_history' => array(
'fd' => array(
'history_id' => array('type' =>
'auto','precision' => '4','nullable' => False),
Index: setup/tables_update.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/tables_update.inc.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- setup/tables_update.inc.php 18 Sep 2006 08:32:33 -0000 1.51
+++ setup/tables_update.inc.php 5 Oct 2006 11:33:53 -0000 1.52
@@ -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.51 2006/09/18 08:32:33
sigurdne Exp $
+ * @version $Id: tables_update.inc.php,v 1.52 2006/10/05 11:33:53
sigurdne Exp $
*/
/**
@@ -1382,5 +1382,53 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
+ /**
+ * Update property version from 0.9.17.524 to 0.9.17.525
+ */
+
+ $test[] = '0.9.17.524';
+ function property_upgrade0_9_17_524()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("delete from phpgw_acl
where acl_appname = 'property' AND acl_location !='run' ");
+ $db2 = clone($GLOBALS['phpgw_setup']->oProc->m_odb);
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_acl_location ");
+ while($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $db2->query("INSERT INTO phpgw_acl_location
(appname,id, descr,allow_grant) VALUES ("
+ . " 'property','"
+ . $GLOBALS['phpgw_setup']->oProc->f('id') . "','"
+ . $GLOBALS['phpgw_setup']->oProc->f('descr') . "',"
+ . (int)$GLOBALS['phpgw_setup']->oProc->f('allow_grant')
. ")");
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM fm_acl2 ");
+ while($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $grantor = 'NULL';
+ if($GLOBALS['phpgw_setup']->oProc->f('grantor')>0)
+ {
+ $grantor =
$GLOBALS['phpgw_setup']->oProc->f('grantor');
+ }
+
+ $db2->query("INSERT INTO phpgw_acl (acl_appname,
acl_location, acl_account, acl_rights, acl_grantor,acl_type) VALUES ("
+ . "'property','"
+ . $GLOBALS['phpgw_setup']->oProc->f('acl_location') .
"','"
+ . $GLOBALS['phpgw_setup']->oProc->f('acl_account') .
"','"
+ . $GLOBALS['phpgw_setup']->oProc->f('acl_rights') . "',"
+ . $grantor . ",'"
+ . (int) $GLOBALS['phpgw_setup']->oProc->f('acl_type') .
"')");
+
+ unset($grantor);
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->DropTable('fm_acl_location');
+ $GLOBALS['phpgw_setup']->oProc->DropTable('fm_acl2');
+
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+ $GLOBALS['setup_info']['property']['currentver'] = '0.9.17.525';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
Index: templates/base/admin.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/admin.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/admin.xsl 17 Jan 2005 10:03:18 -0000 1.1
+++ templates/base/admin.xsl 5 Oct 2006 11:33:54 -0000 1.2
@@ -1,4 +1,4 @@
-<!-- $Id: admin.xsl,v 1.1 2005/01/17 10:03:18 sigurdne Exp $ -->
+<!-- $Id: admin.xsl,v 1.2 2006/10/05 11:33:54 sigurdne Exp $ -->
<xsl:template name="app_data">
<xsl:choose>
@@ -248,42 +248,123 @@
<xsl:value-of select="lang_right"/>
</td>
<td align="center">
+
+ <xsl:choose>
+ <xsl:when test="type = 'users'">
<xsl:choose>
<xsl:when test="read_right =
'checked'">
- <INPUT type="checkbox"
name="values[right][{account_id}_1]" value="1" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_1]" value="1"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="read_right = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[right][{account_id}_1]" value="1"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_1]" value="1" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="read_right = 'checked'">
+ <input
type="checkbox" name="values[right][{account_id}_1]" value="1"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="read_right = 'from_group'">
+ <input
type="checkbox" name="values[right][{account_id}_1]" value="1"
checked="checked" />
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[right][{account_id}_1]" value="1" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
<xsl:when test="add_right =
'checked'">
- <INPUT type="checkbox"
name="values[right][{account_id}_2]" value="2" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_2]" value="2"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="add_right = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[right][{account_id}_2]" value="2"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_2]" value="2" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="add_right = 'checked'">
+ <input
type="checkbox" name="values[right][{account_id}_2]" value="2"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="add_right = 'from_group'">
+ <input
type="checkbox" name="values[right][{account_id}_2]" value="2"
checked="checked" />
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[right][{account_id}_2]" value="2" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
+ <xsl:when
test="edit_right = 'checked'">
+ <input
type="checkbox" name="values[right][{account_id}_4]" value="4"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="edit_right = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[right][{account_id}_4]" value="4" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
<xsl:when test="edit_right =
'checked'">
- <INPUT type="checkbox"
name="values[right][{account_id}_4]" value="4" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_4]" value="4"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="edit_right = 'from_group'">
+ <input
type="checkbox" name="values[right][{account_id}_4]" value="4"
checked="checked" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[right][{account_id}_4]" value="4"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_4]" value="4" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
<xsl:when test="delete_right =
'checked'">
- <INPUT type="checkbox"
name="values[right][{account_id}_8]" value="8" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_8]" value="8"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="delete_right = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[right][{account_id}_8]" value="8"></INPUT>
+ <input
type="checkbox" name="values[right][{account_id}_8]" value="8" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="delete_right = 'checked'">
+ <input
type="checkbox" name="values[right][{account_id}_8]" value="8"
checked="checked" />
+ </xsl:when>
+ <xsl:when
test="delete_right = 'from_group'">
+ <input
type="checkbox" name="values[right][{account_id}_8]" value="8"
checked="checked" />
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[right][{account_id}_8]" value="8" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
@@ -291,16 +372,37 @@
<xsl:when test="//permission= 1">
<td align="center">
<xsl:choose>
+ <xsl:when test="type =
'users'">
+ <xsl:choose>
+
<xsl:when test="manage_right = 'checked'">
+
<input type="checkbox" name="values[right][{account_id}_16]" value="16"
checked="checked" />
+
</xsl:when>
+
<xsl:when test="manage_right = 'from_group'">
+
<input type="checkbox" name="" checked="checked" disabled="disabled" />
+
</xsl:when>
+
<xsl:otherwise>
+
<input type="checkbox" name="values[right][{account_id}_16]" value="16" />
+
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
<xsl:when
test="manage_right = 'checked'">
- <INPUT
type="checkbox" name="values[right][{account_id}_16]" value="16"
checked="checked"></INPUT>
+
<input type="checkbox" name="values[right][{account_id}_16]" value="16"
checked="checked" />
+
</xsl:when>
+
<xsl:when test="manage_right = 'from_group'">
+
<input type="checkbox" name="values[right][{account_id}_16]" value="16"
checked="checked" />
</xsl:when>
<xsl:otherwise>
- <INPUT
type="checkbox" name="values[right][{account_id}_16]" value="16"></INPUT>
+
<input type="checkbox" name="values[right][{account_id}_16]" value="16" />
+
</xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
</xsl:when>
</xsl:choose>
+
<xsl:choose>
<xsl:when test="//location='.invoice'
and //permission= 1 and type= 'users'">
<td align="center">
@@ -356,41 +458,121 @@
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
<xsl:when test="read_mask =
'checked'">
- <INPUT type="checkbox"
name="values[mask][{account_id}_1]" value="1" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_1]" value="1" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="read_mask = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[mask][{account_id}_1]" value="1"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_1]" value="1" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="read_mask = 'checked'">
+ <input
type="checkbox" name="values[mask][{account_id}_1]" value="1" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="read_mask = 'from_group'">
+ <input
type="checkbox" name="values[mask][{account_id}_1]" value="1" checked="checked"
/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[mask][{account_id}_1]" value="1" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
<xsl:when test="add_mask =
'checked'">
- <INPUT type="checkbox"
name="values[mask][{account_id}_2]" value="2" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_2]" value="2" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="add_mask = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[mask][{account_id}_2]" value="2"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_2]" value="2" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="add_mask = 'checked'">
+ <input
type="checkbox" name="values[mask][{account_id}_2]" value="2" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="add_mask = 'from_group'">
+ <input
type="checkbox" name="values[mask][{account_id}_2]" value="2" checked="checked"
/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[mask][{account_id}_2]" value="2" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
+ <xsl:when
test="edit_mask = 'checked'">
+ <input
type="checkbox" name="values[mask][{account_id}_4]" value="4" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="edit_mask = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[mask][{account_id}_4]" value="4" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
<xsl:when test="edit_mask =
'checked'">
- <INPUT type="checkbox"
name="values[mask][{account_id}_4]" value="4" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_4]" value="4" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="edit_mask = 'from_group'">
+ <input
type="checkbox" name="values[mask][{account_id}_4]" value="4" checked="checked"
/>
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[mask][{account_id}_4]" value="4"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_4]" value="4" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<xsl:choose>
+ <xsl:when test="type = 'users'">
+ <xsl:choose>
<xsl:when test="delete_mask =
'checked'">
- <INPUT type="checkbox"
name="values[mask][{account_id}_8]" value="8" checked="checked"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_8]" value="8" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="delete_mask = 'from_group'">
+ <input
type="checkbox" name="" checked="checked" disabled="disabled" />
</xsl:when>
<xsl:otherwise>
- <INPUT type="checkbox"
name="values[mask][{account_id}_8]" value="8"></INPUT>
+ <input
type="checkbox" name="values[mask][{account_id}_8]" value="8" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when
test="delete_mask = 'checked'">
+ <input
type="checkbox" name="values[mask][{account_id}_8]" value="8" checked="checked"
/>
+ </xsl:when>
+ <xsl:when
test="delete_mask = 'from_group'">
+ <input
type="checkbox" name="values[mask][{account_id}_8]" value="8" checked="checked"
/>
+ </xsl:when>
+ <xsl:otherwise>
+ <input
type="checkbox" name="values[mask][{account_id}_8]" value="8" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
@@ -398,11 +580,31 @@
<xsl:when test="//permission= 1">
<td align="center">
<xsl:choose>
+ <xsl:when test="type =
'users'">
+ <xsl:choose>
+
<xsl:when test="manage_mask = 'checked'">
+
<input type="checkbox" name="values[mask][{account_id}_16]" value="16"
checked="checked" />
+
</xsl:when>
+
<xsl:when test="manage_mask = 'from_group'">
+
<input type="checkbox" name="" checked="checked" disabled="disabled" />
+
</xsl:when>
+
<xsl:otherwise>
+
<input type="checkbox" name="values[mask][{account_id}_16]" value="16" />
+
</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
<xsl:when
test="manage_mask = 'checked'">
- <INPUT
type="checkbox" name="values[mask][{account_id}_16]" value="16"
checked="checked"></INPUT>
+
<input type="checkbox" name="values[mask][{account_id}_16]" value="16"
checked="checked" />
+
</xsl:when>
+
<xsl:when test="manage_mask = 'from_group'">
+
<input type="checkbox" name="values[mask][{account_id}_16]" value="16"
checked="checked" />
</xsl:when>
<xsl:otherwise>
- <INPUT
type="checkbox" name="values[mask][{account_id}_16]" value="16"></INPUT>
+
<input type="checkbox" name="values[mask][{account_id}_16]" value="16" />
+
</xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
Index: inc/class.acl2.inc.php
===================================================================
RCS file: inc/class.acl2.inc.php
diff -N inc/class.acl2.inc.php
--- inc/class.acl2.inc.php 4 Oct 2006 08:19:03 -0000 1.14
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,684 +0,0 @@
-<?php
- /**
- * phpGroupWare - property: a Facilities Management System.
- *
- * @author Sigurd Nes <address@hidden>
- * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
- * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
- * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
- * @package property
- * @subpackage core
- * @version $Id: class.acl2.inc.php,v 1.14 2006/10/04 08:19:03 sigurdne
Exp $
- */
-
- /**
- * Description
- * @package property
- */
-
- class acl2
- {
- var $account_id;
- var $host_id;
- var $app_id;
- var $memberships = Array(0=>1); //group 0 is for all users
- var $memberships_sql = ',0'; //group 0 is for all users
- var $rights_cache = Array();
- var $masks_cache = Array();
- var $previous_location; // used for inheritance
- var $db;
-
-
/*************************************************************************\
- * These lines load up the templates class and set some default
values *
-
\*************************************************************************/
- function acl2()
- {
- $expected_args[0] =
Array('name'=>'account_id','default'=>$GLOBALS['phpgw_info']['user']['account_id'],
'type'=>'number');
- $expected_args[1] =
Array('name'=>'host_id','default'=>0, 'type'=>'number');
-// $expected_args[2] =
Array('name'=>'app_id','default'=>$GLOBALS['phpgw']->applications->data[$GLOBALS['phpgw_info']['flags']['currentapp']]['id'],
'type'=>'number');
- $expected_args[2] =
Array('name'=>'app_id','default'=>$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['id'],
'type'=>'number');
-
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
- $this->db =& $GLOBALS['phpgw']->db;
- $this->db2 = clone($GLOBALS['phpgw']->db);
- $this->account_id = $args['account_id'];
- $this->host_id = $args['host_id'];
- $this->app_id = $args['app_id'];
-
- if
($GLOBALS['phpgw_info']['server']['db_type']=='pgsql' ||
$GLOBALS['phpgw_info']['server']['db_type']=='postgres')
- {
- $this->like = "ILIKE";
- }
- else
- {
- $this->like = "LIKE";
- }
- }
-
- function get_memberships ()
- {
- $expected_args[0] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- $sql = "SELECT acl_location,acl_rights FROM fm_acl2
- WHERE (
acl_host='".$this->host_id."' and acl_appid = 0 and acl_account =
".$args['account_id'].")";
- $this->db->query($sql,__LINE__,__FILE__);
-
- while ($this->db->next_record())
- {
-
if(!isset($this->memberships[$this->db->f('acl_location')]))
- {
-
$this->memberships[$this->db->f('acl_location')] = $this->db->f('acl_rights');
- $this->memberships_sql .=
','.$this->db->f('acl_location');
-
$this->get_memberships(Array('account_id'=>$this->db->f('acl_location')));
- }
- }
- }
-
-
- function cache_rights()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] =
Array('name'=>'grantor','default'=>False, 'type'=>'any');
- $expected_args[4] =
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
-
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
-
if(isset($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]))
- {
- return;
- }
-
- $sql = "SELECT
acl_rights,acl_type,acl_data,acl_location FROM fm_acl2 WHERE (acl_appid =
'".$args['app_id']."' ";
- $sql .= " and (acl_account in
(".$args['account_id']."".$this->memberships_sql.'))';
- $sql .= " and acl_location = '". $args['location'] .
"'";
-
- if($args['grantor']>0)
- {
- $sql .= " and (grantor=" . $args['grantor'] .
")";
- }
- else
- {
- $sql .= " and (grantor is NULL)";
- }
-
- $sql .= ') ORDER BY acl_location, acl_type DESC';
-
- $this->db->query($sql,__LINE__,__FILE__);
- while($this->db->next_record())
- {
-
if(!isset($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']])
||
$this->rights_cache[$args['app_id']][$args['account_id']][$args['location']] ==
0)
- {
-
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
= 0;
- }
-
-
if(!isset($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']])
|| $this->masks_cache[$args['app_id']][$args['account_id']][$args['location']]
== 0)
- {
-
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
= 0;
- }
-
- if((int)$this->db->f('acl_type') == 0)
- {
-
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
=
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
- }
- else
- {
-
$this->masks_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
=
$this->bit_set($this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')],(int)$this->db->f('acl_rights'));
- }
-
- if(!$this->db->f('acl_rights'))
- {
-
$this->rights_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
-
$this->masks_cache[$args['app_id']][$args['account_id']][$args['location']]=0;
- }
-
- if(!$args['no_effective'])
- {
-
$this->rights_cache[$args['app_id']][$args['account_id']][$this->db->f('acl_location')]
=
$this->bit_mask($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],
$this->masks_cache[$args['app_id']][$args['account_id']][$args['location']]);
- }
-
- }
- }
-
-
- function check_grant()
- {
- $expected_args[0] =
Array('name'=>'grantor','default'=>$this->account_id, 'type'=>'number');
- $expected_args[1] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[2] =
Array('name'=>'required','default'=>1, 'type'=>'number');
- $expected_args[3] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[5] =
Array('name'=>'no_membership','default'=>false, 'type'=>'number');
- $expected_args[6] =
Array('name'=>'acl_type','default'=>0, 'type'=>'number');
- $expected_args[7] =
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- if(!$args['no_membership'])
- {
- $memberships =
$GLOBALS['phpgw']->accounts->membership($args['account_id']);
-
- while (is_array($memberships) &&
list(,$account) = each($memberships))
- {
- $member_of[] = $account['account_id'];
- }
-
- if($member_of)
- {
- $this->memberships_sql = ',' .
@implode(",",$member_of);
- }
- }
-
-
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],$args['grantor'],$args['no_effective']);
-
- if (
!isset($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']])
)
- {
- return false;
- }
-
- if($args['acl_type']==0)
- {
- return
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
- }
- else
- {
- return
$this->bit_check($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
- }
- }
-
- function check()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'required','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[4] =
Array('name'=>'no_membership','default'=>false, 'type'=>'number');
- $expected_args[5] =
Array('name'=>'acl_type','default'=>0, 'type'=>'number');
- $expected_args[6] =
Array('name'=>'no_effective','default'=>false, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- if(!$args['no_membership'])
- {
- $memberships =
$GLOBALS['phpgw']->accounts->membership($args['account_id']);
-
- while (is_array($memberships) &&
list(,$account) = each($memberships))
- {
- $member_of[] = $account['account_id'];
- }
-
- if(isset($member_of) && is_array($member_of))
- {
- $this->memberships_sql = ',' .
@implode(",",$member_of);
- }
- }
-
-
$this->cache_rights($args['location'],$args['app_id'],$args['account_id'],False,$args['no_effective']);
-
- if (
!isset($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']])
)
- {
- return false;
- }
-
- if($args['acl_type']==0)
- {
- return
$this->bit_check($this->rights_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
- }
- else
- {
- return
$this->bit_check($this->masks_cache[$args['app_id']][$args['account_id']][$args['location']],$args['required']);
- }
- }
-
- /*!
- @function add
- @abstract Adds ACL record to $acl->data
- @discussion Adds ACL record to $acl->data. <br>
- Syntax: array add() <br>
- Example1: acl->add();
- @param $appname default False derives value from
$phpgw_info['flags']['currentapp']
- @param $location location
- @param $rights rights
- */
- function add()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
- $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor is NULL)";
- $this->db->query($sql,__LINE__,__FILE__);
- if($this->db->num_rows() != 0)
- {
- $this->db->next_record();
- $newrights = $this->bit_set($args['rights'],
(int)$this->db->f('acl_rights'));
- $sql = "UPDATE fm_acl2 SET acl_rights
=".$newrights;
- $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
- }
- else
- {
- $sql = "INSERT INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$args['location']."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
- }
- $this->db->query($sql,__LINE__,__FILE__);
- $this->rights_cache = Array();
- $this->masks_cache = Array();
- }
-
- function set_grant() //inheritance is saved to the database
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
- $expected_args[4] =
Array('name'=>'grantor','default'=>NULL, 'type'=>'any');
- $expected_args[5] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[6] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
- if($args['grantor'])
- {
- $grantor = $args['grantor'];
- $grantor_type = 'g';
- }
- else
- {
- $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
- $grantor_type = '';
- }
-
- $sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor = $grantor)";
- $this->db->query($sql,__LINE__,__FILE__);
- while($this->db->next_record())
- {
- if((int)$args['rights'] == 0)
- {
- $sql = "DELETE FROM fm_acl2";
- }
- else
- {
- $sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
- }
- $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'] .
" AND grantor = $grantor";
- $this->db2->query($sql,__LINE__,__FILE__);
-
-
$updated_locations[]=$this->db->f('acl_location');
- }
-
- $sql = "SELECT id FROM fm_acl_location WHERE (id
$this->like '%".$args['location']."%') AND allow_grant=1";
- $this->db->query($sql,__LINE__,__FILE__);
- while($this->db->next_record())
- {
-
- $add_locations[]=$this->db->f('id');
- }
-
- if( isset($updated_locations) &&
is_array($updated_locations))
- {
- $add_locations = array_diff($add_locations,
$updated_locations);
- }
- $add_locations =
explode("-",implode("-",$add_locations));
- if(is_array($add_locations) && count($add_locations)>0)
- {
- for ($i=0;$i<count($add_locations);$i++)
- {
-
- for ($j=0;$j<($i+1);$j++)
- {
- $location
=$add_locations[$j];
- }
-
-
if(strlen($location)>=strlen($args['location']))
- {
- if($args['rights'] != 0)
- {
- $sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and
acl_account = ".$args['account_id'];
- $sql .= " and
acl_location = '$location' and acl_type=".$args['type']. " AND grantor =
$grantor)";
-
$this->db->query($sql,__LINE__,__FILE__);
-
-
if($this->db->num_rows() == 0)
- {
- $sql = "INSERT
INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data,grantor,grantor_type)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$location."',".$args['rights'].",".$args['type'].",'".$args['data']."',$grantor,'$grantor_type')";
-
-
$this->db2->query($sql,__LINE__,__FILE__);
- }
- else
- {
- $sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
- $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'] . " AND grantor = $grantor";
-
$this->db2->query($sql,__LINE__,__FILE__);
- }
- }
- }
- unset($location);
- }
- }
-
- $this->rights_cache = Array();
- $this->masks_cache = Array();
- }
-
- function set() //inheritance is saved to the database
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
- $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
- $sql = "SELECT acl_rights, acl_location FROM fm_acl2
WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." AND grantor is NULL)";
- $this->db->query($sql,__LINE__,__FILE__);
- while($this->db->next_record())
- {
- if((int)$args['rights'] == 0)
- {
- $sql = "DELETE FROM fm_acl2";
- }
- else
- {
- $sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
- }
- $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$this->db->f('acl_location')."' AND acl_type=".$args['type'] .
' AND grantor is NULL';
- $this->db2->query($sql,__LINE__,__FILE__);
-
-
$updated_locations[]=$this->db->f('acl_location');
- }
-
- $sql = "SELECT id FROM fm_acl_location WHERE (id
$this->like '%".$args['location']."%')";
- $this->db->query($sql,__LINE__,__FILE__);
- while($this->db->next_record())
- {
-
- $add_locations[]=$this->db->f('id');
- }
-
- if(isset($updated_locations) &&
is_array($updated_locations))
- {
- $add_locations = array_diff($add_locations,
$updated_locations);
- }
- $add_locations =
explode("-",implode("-",$add_locations));
- if(is_array($add_locations) && count($add_locations)>0)
- {
- for ($i=0;$i<count($add_locations);$i++)
- {
-
- for ($j=0;$j<($i+1);$j++)
- {
- $location
=$add_locations[$j];
- }
-
-
if(strlen($location)>=strlen($args['location']))
- {
- if($args['rights'] != 0)
- {
- $sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and
acl_account = ".$args['account_id'];
- $sql .= " and
acl_location = '$location' and acl_type=".$args['type']." AND grantor is NULL
)";
-
$this->db->query($sql,__LINE__,__FILE__);
-
if($this->db->num_rows() == 0)
- {
- $sql = "INSERT
INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$location."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
-
-
$this->db2->query($sql,__LINE__,__FILE__);
- }
- else
- {
- $sql = "UPDATE
fm_acl2 SET acl_rights =".$args['rights'];
- $sql .= " WHERE
acl_host=".$this->host_id." AND acl_appid=".$args['app_id']." AND
acl_account=".$args['account_id']." AND acl_location='".$location."' AND
acl_type=".$args['type'] . ' AND grantor is NULL';
-
$this->db2->query($sql,__LINE__,__FILE__);
- }
- }
- }
- unset($location);
- }
- }
-
- $this->rights_cache = Array();
- $this->masks_cache = Array();
- }
-
- function remove()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
- $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor is NULL)";
- $this->db->query($sql,__LINE__,__FILE__);
- if($this->db->num_rows() != 0)
- {
- $this->db->next_record();
- $newrights =
$this->bit_mask((int)$this->db->f('acl_rights'),$args['rights']);
- if ($newrights != 0)
- {
- $sql = "UPDATE fm_acl2 SET acl_rights
=".$newrights;
- }
- else
- {
- $sql = "DELETE FROM fm_acl2";
- }
- $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location $this->like '%".$args['location']."%' AND acl_type=".$args['type']
. ' and grantor is NULL';
- $this->db->query($sql,__LINE__,__FILE__);
- $this->rights_cache = Array();
- $this->masks_cache = Array();
- }
- }
-
- function remove_grant()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
- $expected_args[4] =
Array('name'=>'grantor','default'=>NULL, 'type'=>'any');
- $expected_args[5] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $expected_args[6] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- if($args['grantor'])
- {
- $grantor = $args['grantor'];
- }
- else
- {
- $grantor =
$GLOBALS['phpgw_info']['user']['account_id'];
- }
-
- $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type']." and grantor = $grantor)";
- $this->db->query($sql,__LINE__,__FILE__);
- if($this->db->num_rows() != 0)
- {
- $this->db->next_record();
- $newrights =
$this->bit_mask((int)$this->db->f('acl_rights'),$args['rights']);
- if ($newrights != 0)
- {
- $sql = "UPDATE fm_acl2 SET acl_rights
=".$newrights;
- }
- else
- {
- $sql = "DELETE FROM fm_acl2";
- }
- $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location $this->like '%".$args['location']."%' AND acl_type=".$args['type']
. " and grantor = $grantor";
- $this->db->query($sql,__LINE__,__FILE__);
- $this->rights_cache = Array();
- $this->masks_cache = Array();
- }
- }
-
-
/*************************************************************************\
- * Non-standard functions. Should only be used for ACL
management needs *
-
\*************************************************************************/
- function check_specific()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'required','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
- $expected_args[3] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- $sql = "SELECT acl_rights,acl_type,acl_data FROM
fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and acl_account = ".$args['account_id'];
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
- $this->db->query($sql,__LINE__,__FILE__);
- $rights = 0;
- while ($this->db->next_record())
- {
- $rights =
$this->bit_set($rights,(int)$this->db->f('acl_rights'));
- }
- return $this->bit_check($rights,$args['required']);
- }
-
- /* I dont feel this function will be needed, and plan to remove
it when certain.
- function check_location()
- {
- $expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
- $expected_args[1] =
Array('name'=>'required','default'=>1, 'type'=>'number');
- $expected_args[2] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
- $recieved_args = func_get_args();
- $args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
-
- $sql = "SELECT acl_rights,acl_type,acl_data FROM
fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and (acl_account in
(".$this->account_id.",".$this->memberships_sql.'))';
- $sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
- $this->db->query($sql,__LINE__,__FILE__);
- $rights = 0;
- while ($this->db->next_record())
- {
- $rights =
$this->bit_set($rights,(int)$this->db->f('acl_rights'));
- }
- return $this->bit_check($rights,$args['required']);
- }
- */
- function get_grants($app='',$location='')
- {
- if ($app=='')
- {
- $app =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- }
-
- $app_id = $GLOBALS['phpgw_info']['apps'][$app]['id'];
- //$app_id =
$GLOBALS['phpgw']->applications->data[$app]['id'];
-
- $sql = "select grantor,grantor_type, acl_rights from
fm_acl2 where acl_appid = $app_id AND acl_type=0 and acl_location =
'$location' AND grantor is NOT NULL AND"
- . " fm_acl2.acl_account in ";
- $security = "(". $this->account_id ."";
- $myaccounts = CreateObject('phpgwapi.accounts');
- $my_memberships =
$myaccounts->membership($this->account_id);
-
-// unset($myaccounts);
- @reset($my_memberships);
- while($my_memberships && list($key,$group) =
each($my_memberships))
- {
- $security .= "," . $group['account_id'];
- }
- $security .= ')';
- $this->db2->query($sql . $security ,__LINE__,__FILE__);
- $rights = 0;
- $accounts = Array();
- if ($this->db2->num_rows() == 0)
- {
-
$grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31;
- return $grants;
- }
- while ($this->db2->next_record())
- {
- $grantor = $this->db2->f('grantor');
- $rights = $this->db2->f('acl_rights');
-
- $grantor_type = $this->db2->f('grantor_type');
-
- if($grantor_type =='g')
- {
- $grantor_members =
$myaccounts->member($grantor);
-
- foreach($grantor_members as $grantor)
- {
-
$accounts[$grantor['account_id']] = array($grantor['account_id']);
-
-
if(!isset($grants[$grantor['account_id']]))
- {
-
$grants[$grantor['account_id']] = 0;
- }
- $grants[$grantor['account_id']]
|= $rights;
-
reset($accounts[$grantor['account_id']]);
- }
- }
- else
- {
- $accounts[$grantor] = Array($grantor);
- foreach($accounts[$grantor] as
$grantors)
- {
- if(!isset($grants[$grantors]))
- {
- $grants[$grantors] = 0;
- }
- $grants[$grantors] |= $rights;
- }
- reset($accounts[$grantor]);
- }
- }
-
- $grants[$GLOBALS['phpgw_info']['user']['account_id']] =
31;
- return $grants;
- }
-
-
/*************************************************************************\
- * Support functions
*
-
\*************************************************************************/
- /*!
- @function bit_set
- @abstract add/turn_on new bit to current value
- */
- function bit_set($rights, $new)
- {
- return $rights |= $new;
- }
-
- /*!
- @function bit_mask
- @abstract mask/turn_off new bit from current value
- */
- function bit_mask($rights, $mask)
- {
- return $rights &= ~$mask;
- }
-
- /*!
- @function bit_check
- @abstract check if required bit is set/turned_on in the rights
- */
- function bit_check($rights, $required)
- {
- return ($rights & $required);
- }
- }
-?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property inc/class.boadmin.inc.php inc/class.bo...,
Sigurd Nes <=