Commit 4b9a1d9d authored by Leigh B. Stoller's avatar Leigh B. Stoller

More little changes for the eid/pid/filename problem.

parent b66aba51
......@@ -146,11 +146,11 @@ if (strcmp($trust, "group_root") && strcmp($trust, "local_root")) {
#
# No need to tell me how bogus this is.
#
$dirname = "$TBWWW_DIR"."$TBNSSUBDIR"."/"."$exp_id";
$dirname = "$TBWWW_DIR"."$TBNSSUBDIR"."/"."$exp_eid";
$nsname = "$dirname" . "/" . "$exp_id" . ".ns";
$irname = "$dirname" . "/" . "$exp_pid" . "$exp_id" . ".ir";
$irname = "$dirname" . "/" . "$exp_eid" . ".ir";
$repname = "$dirname" . "/" . "$exp_id" . ".report";
$logname = "$dirname" . "/" . "$exp_pid" . "$exp_id" . ".log";
$logname = "$dirname" . "/" . "$exp_eid" . ".log";
$assname = "$dirname" . "/" . "assign" . ".log";
if (! mkdir($dirname, 0777)) {
......
......@@ -25,8 +25,8 @@ if (!isset($uid)) {
#
# Must provide the EID!
#
if (!isset($exp_id) ||
strcmp($exp_id, "") == 0) {
if (!isset($exp_eid) ||
strcmp($exp_eid, "") == 0) {
USERERROR("The experiment ID was not provided!", 1);
}
......@@ -50,16 +50,17 @@ if (($row = mysql_fetch_row($query_result)) == 0) {
# Then check to see if the user (UID) is a member of that PID.
#
$query_result = mysql_db_query($TBDBNAME,
"SELECT * FROM experiments WHERE eid=\"$exp_id\"");
"SELECT * FROM experiments WHERE eid=\"$exp_eid\"");
if (($exprow = mysql_fetch_array($query_result)) == 0) {
USERERROR("The experiment $exp_id is not a valid experiment.", 1);
USERERROR("The experiment $exp_eid is not a valid experiment.", 1);
}
$pid = $exprow[pid];
$query_result = mysql_db_query($TBDBNAME,
"SELECT pid FROM proj_memb WHERE uid=\"$uid\" and pid=\"$pid\"");
if (mysql_num_rows($query_result) == 0) {
USERERROR("You are not a member of the Project for Experiment: $exp_id.", 1);
USERERROR("You are not a member of the Project for Experiment: $exp_eid.",
1);
}
#
......@@ -71,11 +72,12 @@ if (mysql_num_rows($query_result) == 0) {
#
# No need to tell me how bogus this is.
#
$dirname = "$TBWWW_DIR"."$TBNSSUBDIR"."/"."$exp_id";
$exp_id = substr($exp_eid, strlen($pid));
$dirname = "$TBWWW_DIR"."$TBNSSUBDIR"."/"."$exp_eid";
$nsname = "$dirname" . "/" . "$exp_id" . ".ns";
$irname = "$dirname" . "/" . "$exp_id" . ".ir";
$irname = "$dirname" . "/" . "$exp_eid" . ".ir";
$repname = "$dirname" . "/" . "$exp_id" . ".report";
$logname = "$dirname" . "/" . "$exp_id" . ".log";
$logname = "$dirname" . "/" . "$exp_eid" . ".log";
$assname = "$dirname" . "/" . "assign" . ".log";
#
......
......@@ -67,7 +67,7 @@ echo "<form action=\"endexp.php3?$uid\" method=\"post\">";
# experiments as an option list.
#
echo "<tr>";
echo " <td><select name=\"exp_id\">";
echo " <td><select name=\"exp_eid\">";
while ($grprow = mysql_fetch_array($groupmemb_result)) {
$pid = $grprow[gid];
$exp_result = mysql_db_query($TBDBNAME,
......
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