Skip to content

Commit c2c6801

Browse files
committed
ENH: On the svninfo.php page, also display the contents of the local config file overrides, if they exist.
1 parent c51e210 commit c2c6801

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

svninfo.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
=========================================================================*/
1818

19-
include('login.php');
19+
require_once('login.php');
2020

2121

2222
function echo_svn_output($cmd)
@@ -34,6 +34,24 @@ function echo_svn_output($cmd)
3434
}
3535

3636

37+
function echo_file_contents($filename)
38+
{
39+
// Emit the contents of the named file, but only if it exists.
40+
// If it doesn't exist, emit nothing.
41+
//
42+
if (file_exists($filename))
43+
{
44+
$contents = file_get_contents($filename);
45+
46+
echo '<h3>contents of "'.$filename.'"</h3>';
47+
echo '<pre>';
48+
echo htmlentities($contents);
49+
echo '</pre>';
50+
echo '<br/>';
51+
}
52+
}
53+
54+
3755
if ($session_OK)
3856
{
3957
$userid = $_SESSION['cdash']['loginid'];
@@ -50,6 +68,10 @@ function echo_svn_output($cmd)
5068
echo_svn_output('status');
5169
echo_svn_output('diff');
5270

71+
global $CDASH_ROOT_DIR;
72+
echo_file_contents($CDASH_ROOT_DIR.'/cdash/config.local.php');
73+
echo_file_contents($CDASH_ROOT_DIR.'/tests/config.test.local.php');
74+
5375
echo '<h3>phpinfo</h3>';
5476
phpinfo();
5577
echo '<br/>';

0 commit comments

Comments
 (0)