From 5e0ab90cb25fa1299817c21e234cee968cd27cea Mon Sep 17 00:00:00 2001 From: jengo Date: Sat, 10 Mar 2001 09:10:49 +0000 Subject: [PATCH] Cleaned up PHP warnings --- preferences/settings.php | 46 ++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/preferences/settings.php b/preferences/settings.php index 823d212106..ad24adb313 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -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;$kaccounts->memberships($owner); - for($k=0;$kget_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;$kaccounts->memberships($owner); + for ($k=0;$kget_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") {