Commit 1bb92c6a authored by Leigh B. Stoller's avatar Leigh B. Stoller

A couple of minor changes to address comment by Rob that the

"approved" designation is confusing. Changed to reflect group
membership trust!=none instead of user status=active since thats what
people really want to know.
parent 68441fba
......@@ -952,7 +952,7 @@ function TBProjList($uid, $access_type)
$query_result =
DBQueryFatal("SELECT distinct pid,gid FROM group_membership ".
"WHERE uid='$uid' and $trust_clause");
"WHERE uid='$uid' and $trust_clause order by pid");
if (mysql_num_rows($query_result) == 0) {
return $result;
......
......@@ -72,7 +72,6 @@ if (mysql_num_rows($query_result)) {
while ($row = mysql_fetch_array($query_result)) {
$target_uid = $row[uid];
$usr_name = $row[usr_name];
$status = $row[status];
$trust = $row[trust];
echo "<tr>
......@@ -82,9 +81,8 @@ if (mysql_num_rows($query_result)) {
$target_uid</A>
</td>
<td>$trust</td>\n";
if (strcmp($status, "active") == 0 ||
strcmp($status, "unverified") == 0) {
if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
echo "<td align=center>
<img alt=\"Y\" src=\"greenball.gif\"></td>\n";
}
......
......@@ -278,7 +278,7 @@ function SHOWGROUPMEMBERS($pid, $gid) {
function SHOWGROUPMEMBERSHIP($uid) {
$query_result =
DBQueryFatal("SELECT * FROM group_membership ".
"WHERE uid='$uid'");
"WHERE uid='$uid' order by pid");
if (! mysql_num_rows($query_result)) {
return;
......@@ -300,12 +300,13 @@ function SHOWGROUPMEMBERSHIP($uid) {
$gid = $row[gid];
$trust = $row[trust];
echo "<tr>
<td>$pid</td>
<td>$gid</td>
<td>$trust</td>\n";
echo "</tr>\n";
if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
echo "<tr>
<td>$pid</td>
<td>$gid</td>
<td>$trust</td>\n";
echo "</tr>\n";
}
}
echo "</table>\n";
}
......
......@@ -113,9 +113,10 @@ echo "</center>\n";
# Lets show projects.
#
$query_result =
DBQueryFatal("select distinct g.pid,p.name from group_membership as g ".
DBQueryFatal("select distinct g.pid,g.trust,p.name ".
" from group_membership as g ".
"left join projects as p on p.pid=g.pid ".
"where uid='$target_uid' order by pid");
"where uid='$target_uid' and g.pid=g.gid order by pid");
if (mysql_num_rows($query_result)) {
echo "<center>
......@@ -129,13 +130,16 @@ if (mysql_num_rows($query_result)) {
</tr>\n";
while ($projrow = mysql_fetch_array($query_result)) {
$pid = $projrow[pid];
$name = $projrow[name];
echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td>$name</td>
</tr>\n";
$pid = $projrow[pid];
$name = $projrow[name];
$trust = $projrow[trust];
if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td>$name</td>
</tr>\n";
}
}
echo "</table>\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment