mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Cleaned up PHP warnings
This commit is contained in:
parent
215ad8f011
commit
5e0ab90cb2
@ -19,23 +19,37 @@
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
function is_user_admin($owner) {
|
||||
global $phpgw;
|
||||
function is_user_admin($owner)
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$acl = CreateObject('phpgwapi.acl',intval($owner));
|
||||
$acl_list = $acl->read_repository();
|
||||
for($k=0;$k<count($acl_list);$k++) {
|
||||
if($apps_list[$k]['appname'] == 'admin') return True;
|
||||
}
|
||||
$memberships = $phpgw->accounts->memberships($owner);
|
||||
for($k=0;$k<count($memberships);$k++) {
|
||||
$apps_list = $acl->get_app_list_for_id('run',1,$memberships[$k]['account_id']);
|
||||
while($apps = each($apps_list)) {
|
||||
if($apps[1] == 'admin') return True;
|
||||
}
|
||||
}
|
||||
return False;
|
||||
}
|
||||
$acl = CreateObject('phpgwapi.acl',intval($owner));
|
||||
$acl_list = $acl->read_repository();
|
||||
for ($k=0;$k<count($acl_list);$k++)
|
||||
{
|
||||
if ($apps_list[$k]['appname'] == 'admin')
|
||||
{
|
||||
return True;
|
||||
}
|
||||
}
|
||||
$memberships = $phpgw->accounts->memberships($owner);
|
||||
for ($k=0;$k<count($memberships);$k++)
|
||||
{
|
||||
$apps_list = $acl->get_app_list_for_id('run',1,$memberships[$k]['account_id']);
|
||||
|
||||
if (is_array($apps_list))
|
||||
{
|
||||
while($apps = each($apps_list))
|
||||
{
|
||||
if($apps[1] == 'admin')
|
||||
{
|
||||
return True;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return False;
|
||||
}
|
||||
|
||||
if (! $submit) {
|
||||
if ($phpgw_info["server"]["useframes"] != "never") {
|
||||
|
Loading…
Reference in New Issue
Block a user