Commit 268f9fde authored by Leigh Stoller's avatar Leigh Stoller

Install doc/ChangeLog into www dir as ChangeLog.txt for inclusion into

the news page. Better than trying to keep Changelog.html in sync.
Change docwrapper.php3 to treat .txt files as special so that they are
readable.
parent 1f12fbc9
......@@ -111,6 +111,8 @@ install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \
$(addprefix $(INSTALL_WWWDIR)/autostatus-icons/, $(ALLICONS)) \
$(addprefix $(INSTALL_WWWDIR)/cvsweb/, $(ALLCVSWEB))
-mkdir -p -m 771 $(INSTALL_WWWDIR)/thumbs
$(INSTALL_DATA) $(TESTBED_SRCDIR)/doc/ChangeLog \
$(INSTALL_WWWDIR)/doc/ChangeLog.txt
cd $(INSTALL_WWWDIR) && \
if test -d ../webglimpse; \
then \
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
chdir("..");
......@@ -31,6 +31,15 @@ if (strstr($docname, "../")) {
USERERROR("Invalid document name: $docname!", 1);
}
#
# Check extension. If a .txt file, need some extra wrapper stuff to make
# it look readable.
#
$textfile = 0;
if (preg_match("/^.*\.txt$/", $docname)) {
$textfile = 1;
}
if ($printable) {
#
# Need to spit out some header stuff.
......@@ -46,8 +55,16 @@ else {
Printable version of this document</a></b><br>\n";
}
if ($textfile) {
echo "<XMP>\n";
}
readfile("$docname");
if ($textfile) {
echo "</XMP>\n";
}
#
# Standard Testbed Footer
#
......
......@@ -188,7 +188,7 @@ if ($isadmin) {
<table align=center class=stealth border=0>
<tr><td class=stealth align=center><h1>News</h1></td></tr>
<tr><td class=stealth align=center>
<a href = 'doc/docwrapper.php3?docname=changelog.html'>
<a href = 'doc/docwrapper.php3?docname=ChangeLog.txt'>
(Changelog/Technical Details)</a></td></tr>
</table>
<br />
......
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