Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
82e86dba
Commit
82e86dba
authored
Jun 21, 2002
by
Leigh B. Stoller
Browse files
Add TBExptLogFile() function and use that in spewlogfile instead of
the actual query.
parent
61480857
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/dbdefs.php3.in
View file @
82e86dba
...
...
@@ -1122,6 +1122,20 @@ function TBUserPCs($uid)
return
mysql_num_rows
(
$query_result
);
}
function
TBExptLogFile
(
$pid
,
$eid
)
{
$query_result
=
DBQueryFatal
(
"select logfile from experiments "
.
"where pid='
$pid
' and eid='
$eid
' and "
.
" logfile is not null"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
return
0
;
}
$row
=
mysql_fetch_row
(
$query_result
);
return
$row
[
0
];
}
function
TBWebdbAllowed
(
$uid
)
{
$query_result
=
DBQueryFatal
(
"select dbedit from users "
.
...
...
www/spewlogfile.php3
View file @
82e86dba
...
...
@@ -45,11 +45,7 @@ if (! TBExptAccessCheck($uid, $pid, $eid, $TB_EXPT_READINFO)) {
# Check for a logfile. This file is transient, so it could be gone by
# the time we get to reading it.
#
$query_result
=
DBQueryFatal
(
"select logfile from experiments "
.
"where pid='
$pid
' and eid='
$eid
' and logfile is not null"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
if
(
!
TBExptLogFile
(
$pid
,
$eid
))
{
USERERROR
(
"Experiment
$pid
/
$eid
is no longer in transition!"
,
1
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment