You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ac...@apache.org on 2012/09/07 19:54:24 UTC

svn commit: r1382102 - in /vcl: branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php trunk/web/.ht-inc/utils.php

Author: acoburn
Date: Fri Sep  7 17:54:24 2012
New Revision: 1382102

URL: http://svn.apache.org/viewvc?rev=1382102&view=rev
Log:
VCL-624

The getUserlistID function takes a user's loginid as its first parameter. Because of the way findAffilFunc is written, it is possible to hand the function a unityid and it doesn't die, but it is still incorrect. That is, it doesn't die as long as the
system uses the testGeneralAffiliation function in the findAffilFuncs array.


Modified:
    vcl/branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php
    vcl/trunk/web/.ht-inc/utils.php

Modified: vcl/branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php?rev=1382102&r1=1382101&r2=1382102&view=diff
==============================================================================
--- vcl/branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php (original)
+++ vcl/branches/vcl-2.3-bugfixes/web/.ht-inc/utils.php Fri Sep  7 17:54:24 2012
@@ -2203,7 +2203,7 @@ function getResourcesFromGroups($groups,
 ///
 /// \fn updateUserOrGroupPrivs($name, $node, $adds, $removes, $mode)
 ///
-/// \param $name - unityid, user id, or user group id
+/// \param $name - loginid, user id, or user group id
 /// \param $node - id of the node
 /// \param $adds - array of privs (the name, not the id) to add
 /// \param $removes - array of privs (the name, not the id) to remove
@@ -2834,22 +2834,21 @@ function getUserGroupMembers($groupid) {
 
 ////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn addUserGroupMember($unityid, $groupid)
+/// \fn addUserGroupMember($loginid, $groupid)
 ///
-/// \param $unityid - a user's unityid
+/// \param $loginid - a user's loginid
 /// \param $groupid - a usergroup id
 ///
 /// \brief adds an entry to usergroupmembers for $unityid and $groupid
 ///
 ////////////////////////////////////////////////////////////////////////////////
-function addUserGroupMember($unityid, $groupid) {
-	$userid = getUserlistID($unityid);
+function addUserGroupMember($loginid, $groupid) {
+	$userid = getUserlistID($loginid);
 	$groups = getUsersGroups($userid);
 
 	if(in_array($groupid, array_keys($groups)))
 		return;
 
-	//$userid = getUserlistID($unityid);
 	$query = "INSERT INTO usergroupmembers "
 	       .        "(userid, " 
 	       .        "usergroupid) "
@@ -4960,8 +4959,7 @@ function getRequestInfo($id, $returnNULL
 ///
 ////////////////////////////////////////////////////////////////////////////////
 function updateRequest($requestid) {
-	global $requestInfo, $user;
-	$userid = getUserlistID($user['unityid']);
+	global $requestInfo;
 	$startstamp = unixToDatetime($requestInfo["start"]);
 	$endstamp = unixToDatetime($requestInfo["end"]);
 

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1382102&r1=1382101&r2=1382102&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Fri Sep  7 17:54:24 2012
@@ -2203,7 +2203,7 @@ function getResourcesFromGroups($groups,
 ///
 /// \fn updateUserOrGroupPrivs($name, $node, $adds, $removes, $mode)
 ///
-/// \param $name - unityid, user id, or user group id
+/// \param $name - loginid, user id, or user group id
 /// \param $node - id of the node
 /// \param $adds - array of privs (the name, not the id) to add
 /// \param $removes - array of privs (the name, not the id) to remove
@@ -2834,22 +2834,21 @@ function getUserGroupMembers($groupid) {
 
 ////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn addUserGroupMember($unityid, $groupid)
+/// \fn addUserGroupMember($loginid, $groupid)
 ///
-/// \param $unityid - a user's unityid
+/// \param $loginid - a user's loginid
 /// \param $groupid - a usergroup id
 ///
 /// \brief adds an entry to usergroupmembers for $unityid and $groupid
 ///
 ////////////////////////////////////////////////////////////////////////////////
-function addUserGroupMember($unityid, $groupid) {
-	$userid = getUserlistID($unityid);
+function addUserGroupMember($loginid, $groupid) {
+	$userid = getUserlistID($loginid);
 	$groups = getUsersGroups($userid);
 
 	if(in_array($groupid, array_keys($groups)))
 		return;
 
-	//$userid = getUserlistID($unityid);
 	$query = "INSERT INTO usergroupmembers "
 	       .        "(userid, " 
 	       .        "usergroupid) "
@@ -4960,8 +4959,7 @@ function getRequestInfo($id, $returnNULL
 ///
 ////////////////////////////////////////////////////////////////////////////////
 function updateRequest($requestid) {
-	global $requestInfo, $user;
-	$userid = getUserlistID($user['unityid']);
+	global $requestInfo;
 	$startstamp = unixToDatetime($requestInfo["start"]);
 	$endstamp = unixToDatetime($requestInfo["end"]);