mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:18:54 +01:00
Cleaned up some uneeded sections of code
This commit is contained in:
parent
6e4f85e49b
commit
31d74f4bcb
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Todo *
|
||||
* phpGroupWare - Preferences *
|
||||
* http://www.phpgroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
@ -21,13 +21,6 @@
|
||||
$phpgw_info['flags'] = $phpgw_flags;
|
||||
include('../header.inc.php');
|
||||
|
||||
$private_acl = True;
|
||||
|
||||
if($private_acl == True)
|
||||
{
|
||||
define(PHPGW_ACL_PRIVATE,16);
|
||||
}
|
||||
|
||||
function check_acl($label,$id,$acl,$rights,$right)
|
||||
{
|
||||
global $phpgw_info, $p;
|
||||
@ -46,24 +39,17 @@
|
||||
|
||||
function display_row($bg_color,$label,$id,$name)
|
||||
{
|
||||
global $phpgw_info, $acl, $private_acl, $p;
|
||||
global $phpgw_info, $acl, $p;
|
||||
|
||||
$p->set_var('row_color',$bg_color);
|
||||
$p->set_var('user',$name);
|
||||
$rights = $acl->get_rights($id,$phpgw_info['flags']['currentapp']);
|
||||
|
||||
check_acl($label,$id,'read',$rights,PHPGW_ACL_READ);
|
||||
|
||||
check_acl($label,$id,'add',$rights,PHPGW_ACL_ADD);
|
||||
|
||||
check_acl($label,$id,'edit',$rights,PHPGW_ACL_EDIT);
|
||||
|
||||
check_acl($label,$id,'delete',$rights,PHPGW_ACL_DELETE);
|
||||
|
||||
if($private_acl == True)
|
||||
{
|
||||
check_acl($label,$id,'private',$rights,PHPGW_ACL_PRIVATE);
|
||||
}
|
||||
|
||||
$p->parse('row','acl_row',True);
|
||||
}
|
||||
@ -172,22 +158,11 @@
|
||||
}
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw_info['server']['app_tpl']);
|
||||
if($private_acl == True)
|
||||
{
|
||||
$templates = Array (
|
||||
'preferences' => 'preference_acl.tpl',
|
||||
'row_colspan' => 'preference_colspan_private.tpl',
|
||||
'acl_row' => 'preference_acl_row_private.tpl'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$templates = Array (
|
||||
'preferences' => 'preference_acl.tpl',
|
||||
'row_colspan' => 'preference_colspan.tpl',
|
||||
'acl_row' => 'preference_acl_row.tpl'
|
||||
);
|
||||
}
|
||||
|
||||
$p->set_file($templates);
|
||||
// $p->set_var('errors','<p><center><b>This does nothing at this time!<br>Strictly as a template for use!</b></center>');
|
||||
@ -226,11 +201,7 @@
|
||||
);
|
||||
|
||||
$p->set_var($var);
|
||||
|
||||
if($private_acl == True)
|
||||
{
|
||||
$p->set_var('private_lang',lang('Private'));
|
||||
}
|
||||
|
||||
if(intval($s_groups) <> count($groups))
|
||||
{
|
||||
@ -314,6 +285,6 @@
|
||||
|
||||
$p->set_var($var);
|
||||
|
||||
$p->pparse('out','preferences');
|
||||
$p->pfp('out','preferences');
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user