[geeklog-cvs] geeklog-1.3/system lib-security.php,1.23,1.24
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Wed Dec 29 03:41:26 EST 2004
Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv23337/system
Modified Files:
lib-security.php
Log Message:
Fixed caching of $_GROUPS
Index: lib-security.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-security.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** lib-security.php 18 Dec 2004 15:25:50 -0000 1.23
--- lib-security.php 29 Dec 2004 08:41:24 -0000 1.24
***************
*** 165,178 ****
global $_TABLES, $_USER, $_SEC_VERBOSE, $_GROUPS;
! if ( empty($uid) || ($uid == $_USER['uid'])
! || ($uid == 1 && empty($_USER['uid'])) ) {
! if (empty($_USER['uid'])) {
$uid = 1;
} else {
$uid = $_USER['uid'];
}
! if (empty($_GROUPS)) {
! $_GROUPS = SEC_getUserGroups($uid);
}
$groups = $_GROUPS;
--- 165,179 ----
global $_TABLES, $_USER, $_SEC_VERBOSE, $_GROUPS;
! if (empty ($uid)) {
! if (empty ($_USER['uid'])) {
$uid = 1;
} else {
$uid = $_USER['uid'];
}
+ }
! if ((empty ($_USER['uid']) && ($uid == 1)) || ($uid == $_USER['uid'])) {
! if (empty ($_GROUPS)) {
! $_GROUPS = SEC_getUserGroups ($uid);
}
$groups = $_GROUPS;
***************
*** 453,458 ****
// Get user ID if we don't already have it
! if (empty($uid)) {
! if (empty($_USER['uid'])) {
$uid = 1;
} else {
--- 454,459 ----
// Get user ID if we don't already have it
! if (empty ($uid)) {
! if (empty ($_USER['uid'])) {
$uid = 1;
} else {
***************
*** 461,471 ****
}
! if ($uid == $_USER['uid']) {
! if (!isset($_GROUPS)) {
! $_GROUPS = SEC_getUserGroups($uid);
}
$groups = $_GROUPS;
} else {
! $groups = SEC_getUserGroups($uid);
}
--- 462,472 ----
}
! if ((empty ($_USER['uid']) && ($uid == 1)) || ($uid == $_USER['uid'])) {
! if (empty ($_GROUPS)) {
! $_GROUPS = SEC_getUserGroups ($uid);
}
$groups = $_GROUPS;
} else {
! $groups = SEC_getUserGroups ($uid);
}
***************
*** 615,618 ****
--- 616,622 ----
$uid = $_USER['uid'];
}
+ }
+
+ if ((empty ($_USER['uid']) && ($uid == 1)) || ($uid == $_USER['uid'])) {
if (empty ($_GROUPS)) {
$_GROUPS = SEC_getUserGroups ($uid);
More information about the geeklog-cvs
mailing list