Commit 6ee42b31 authored by Robert Ricci's avatar Robert Ricci
Browse files

Make SHOWEXPLIST handle groups properly - it now takes an optional

second argument so that you can pass ($pid,$gid) when showing a
group's experiments. But, it has a default value, so you don't have
to around around passing a superfluous second argument for showing
user or project experiments.
parent 5ed547c2
......@@ -106,7 +106,7 @@ if (TBProjAccessCheck($uid, $pid, $gid, $TB_PROJECT_EDITGROUP) ||
#
# A list of Group experiments.
#
SHOWEXPLIST("GROUP",$gid);
SHOWEXPLIST("GROUP",$pid,$gid);
if ($isadmin) {
echo "<center>
......
......@@ -827,7 +827,7 @@ function SHOWEXP($pid, $eid, $short = 0) {
#
# Show a listing of experiments by user/pid/gid
#
function SHOWEXPLIST($type,$id) {
function SHOWEXPLIST($type,$id,$gid = "") {
if ($type == "USER") {
$where = "expt_head_uid='$id'";
$title = "Current";
......@@ -836,7 +836,7 @@ function SHOWEXPLIST($type,$id) {
$title = "Project";
$nopid = 1;
} elseif ($type == "GROUP") {
$where = "e.gid='$id'";
$where = "e.pid='$id' and e.gid='$gid'";
$title = "Group";
$nopid = 1;
} else {
......
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