Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Elijah Grubb
emulab-devel
Commits
82e86dba
Commit
82e86dba
authored
Jun 21, 2002
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TBExptLogFile() function and use that in spewlogfile instead of
the actual query.
parent
61480857
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
www/dbdefs.php3.in
www/dbdefs.php3.in
+14
-0
www/spewlogfile.php3
www/spewlogfile.php3
+1
-5
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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