You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2015/01/30 19:41:32 UTC

svn commit: r1656086 - /vcl/trunk/web/.ht-inc/utils.php

Author: jfthomps
Date: Fri Jan 30 18:41:31 2015
New Revision: 1656086

URL: http://svn.apache.org/r1656086
Log:
VCL-811 - server requests for owned user groups show up in reservation list

utils.php: modified getUserRequests: instead of using $user['groups'] for the list of user groups, call getUserGroups without specifying to include owned groups; this gives us a list of user groups that does not include user groups the user owns but is not a member of

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

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1656086&r1=1656085&r2=1656086&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Fri Jan 30 18:41:31 2015
@@ -6108,10 +6108,11 @@ function getUserRequests($type, $id=0) {
 	global $user;
 	if($id == 0)
 		$id = $user["id"];
-	if(empty($user['groups']))
+	$includegroups = getUsersGroups($user["id"]);
+	if(empty($includegroups))
 		$ingroupids = "''";
 	else
-		$ingroupids = implode(',', array_keys($user['groups']));
+		$ingroupids = implode(',', array_keys($includegroups));
 	$query = "SELECT i.name AS image, "
 	       .        "i.prettyname AS prettyimage, "
 	       .        "i.id AS imageid, "