From 6ea3d10e963053f8e82139ce6ae98c7ba43d267f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 10 Feb 2004 02:49:46 +0000 Subject: [PATCH] readded some performance enhancers --- lib/WebGUI/Privilege.pm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/WebGUI/Privilege.pm b/lib/WebGUI/Privilege.pm index f5d5fcc8e..f8d9dc14d 100644 --- a/lib/WebGUI/Privilege.pm +++ b/lib/WebGUI/Privilege.pm @@ -264,20 +264,20 @@ sub isInGroup { $uid = $session{user}{userId} if ($uid eq ""); - #The several checks are to increase performance. If this section were removed, everything would continue to work as normal. -# if ($gid == 7) { -# return 1; -# } -# if ($gid == 1) { -# if ($uid == 1) { -# return 1; -# } else { -# return 0; -# } -# } -# if ($gid==2 && $uid != 1) { -# return 1; -# } + ### The following several checks are to increase performance. If this section were removed, everything would continue to work as normal. + if ($gid == 7) { + return 1; + } + if ($gid == 1) { + if ($uid == 1) { + return 1; + } else { + return 0; + } + } + if ($gid==2 && $uid != 1) { + return 1; + }