Commit 66a5d9c5 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor changes for EID length and project prefix.

parent 9d815da4
......@@ -104,7 +104,8 @@ echo " </td>
#
echo "<tr>
<td>*Name<br>(will be prefixed by project name):</td>
<td><input type=\"text\" name=\"exp_id\">
<td><input type=\"text\" name=\"exp_id\"
size=\"22\" MAXLENGTH=\"22\">
</td>
</tr>\n";
......
......@@ -90,9 +90,16 @@ if ($row = mysql_fetch_row($pswd_result)) {
}
#
# Current policy is to prefix the EID with the PID.
# Current policy is to prefix the EID with the PID. Make sure it is not
# too long for the database.
#
$exp_eid = $exp_pid . "-" . $exp_id;
# XXX Note CONSTANT in expression!
#
$exp_eid = $exp_pid . $exp_id;
if (strlen($exp_id) > 22) {
USERERROR("The experiment name \"$exp_id\" is too long! ".
"Please select another.", 1);
}
#
# Make sure the experiment ID does not already exist.
......
......@@ -71,12 +71,11 @@ if (mysql_num_rows($query_result) == 0) {
#
# No need to tell me how bogus this is.
#
$exp_pid = $pid;
$dirname = "$TBWWW_DIR"."$TBNSSUBDIR"."/"."$exp_id";
$nsname = "$dirname" . "/" . "$exp_id" . ".ns";
$irname = "$dirname" . "/" . "$exp_pid" . "$exp_id" . ".ir";
$irname = "$dirname" . "/" . "$exp_id" . ".ir";
$repname = "$dirname" . "/" . "$exp_id" . ".report";
$logname = "$dirname" . "/" . "$exp_pid" . "$exp_id" . ".log";
$logname = "$dirname" . "/" . "$exp_id" . ".log";
$assname = "$dirname" . "/" . "assign" . ".log";
#
......@@ -97,7 +96,7 @@ echo "</center>";
#
$output = array();
$retval = 0;
$result = exec("$TBBIN_DIR/tbstopit $dirname $exp_pid$exp_id.ir",
$result = exec("$TBBIN_DIR/tbstopit $dirname $exp_id.ir",
$output, $retval);
if ($retval) {
echo "<br><br><h2>
......
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