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) ...@@ -952,7 +952,7 @@ function TBProjList($uid, $access_type)
$query_result = $query_result =
DBQueryFatal("SELECT distinct pid,gid FROM group_membership ". 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) { if (mysql_num_rows($query_result) == 0) {
return $result; return $result;
......
...@@ -72,7 +72,6 @@ if (mysql_num_rows($query_result)) { ...@@ -72,7 +72,6 @@ if (mysql_num_rows($query_result)) {
while ($row = mysql_fetch_array($query_result)) { while ($row = mysql_fetch_array($query_result)) {
$target_uid = $row[uid]; $target_uid = $row[uid];
$usr_name = $row[usr_name]; $usr_name = $row[usr_name];
$status = $row[status];
$trust = $row[trust]; $trust = $row[trust];
echo "<tr> echo "<tr>
...@@ -82,9 +81,8 @@ if (mysql_num_rows($query_result)) { ...@@ -82,9 +81,8 @@ if (mysql_num_rows($query_result)) {
$target_uid</A> $target_uid</A>
</td> </td>
<td>$trust</td>\n"; <td>$trust</td>\n";
if (strcmp($status, "active") == 0 || if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
strcmp($status, "unverified") == 0) {
echo "<td align=center> echo "<td align=center>
<img alt=\"Y\" src=\"greenball.gif\"></td>\n"; <img alt=\"Y\" src=\"greenball.gif\"></td>\n";
} }
......
...@@ -278,7 +278,7 @@ function SHOWGROUPMEMBERS($pid, $gid) { ...@@ -278,7 +278,7 @@ function SHOWGROUPMEMBERS($pid, $gid) {
function SHOWGROUPMEMBERSHIP($uid) { function SHOWGROUPMEMBERSHIP($uid) {
$query_result = $query_result =
DBQueryFatal("SELECT * FROM group_membership ". DBQueryFatal("SELECT * FROM group_membership ".
"WHERE uid='$uid'"); "WHERE uid='$uid' order by pid");
if (! mysql_num_rows($query_result)) { if (! mysql_num_rows($query_result)) {
return; return;
...@@ -300,12 +300,13 @@ function SHOWGROUPMEMBERSHIP($uid) { ...@@ -300,12 +300,13 @@ function SHOWGROUPMEMBERSHIP($uid) {
$gid = $row[gid]; $gid = $row[gid];
$trust = $row[trust]; $trust = $row[trust];
echo "<tr> if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
<td>$pid</td> echo "<tr>
<td>$gid</td> <td>$pid</td>
<td>$trust</td>\n"; <td>$gid</td>
<td>$trust</td>\n";
echo "</tr>\n"; echo "</tr>\n";
}
} }
echo "</table>\n"; echo "</table>\n";
} }
......
...@@ -113,9 +113,10 @@ echo "</center>\n"; ...@@ -113,9 +113,10 @@ echo "</center>\n";
# Lets show projects. # Lets show projects.
# #
$query_result = $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 ". "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)) { if (mysql_num_rows($query_result)) {
echo "<center> echo "<center>
...@@ -129,13 +130,16 @@ if (mysql_num_rows($query_result)) { ...@@ -129,13 +130,16 @@ if (mysql_num_rows($query_result)) {
</tr>\n"; </tr>\n";
while ($projrow = mysql_fetch_array($query_result)) { while ($projrow = mysql_fetch_array($query_result)) {
$pid = $projrow[pid]; $pid = $projrow[pid];
$name = $projrow[name]; $name = $projrow[name];
$trust = $projrow[trust];
echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td> if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
<td>$name</td> echo "<tr>
</tr>\n"; <td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td>$name</td>
</tr>\n";
}
} }
echo "</table>\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