diff options
author | David M <davidmj@users.sourceforge.net> | 2007-07-10 17:46:47 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-07-10 17:46:47 +0000 |
commit | a694c17791eb0375bc9259397a68849a35145281 (patch) | |
tree | 9167b9dfb11e93da072ff30c910f3a550aae1318 | |
parent | e5ae1698cac8f0eb222e23170cf3459bdff103c5 (diff) | |
download | forums-a694c17791eb0375bc9259397a68849a35145281.tar forums-a694c17791eb0375bc9259397a68849a35145281.tar.gz forums-a694c17791eb0375bc9259397a68849a35145281.tar.bz2 forums-a694c17791eb0375bc9259397a68849a35145281.tar.xz forums-a694c17791eb0375bc9259397a68849a35145281.zip |
#12777
git-svn-id: file:///svn/phpbb/trunk@7864 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_php_info.php | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index ddc8ec9f17..2c0bcc6f37 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -204,6 +204,7 @@ p a { <li>[Fix] Place attachment filename in new line in posting editor (Bug #9726)</li> <li>[Fix] Don't allow caching to occur in the update sequence (Bug #13207)</li> <li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li> + <li>[Fix] Handle phpinfo() when expose_php is false (Bug #12777)</li> </ul> diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php index d18d64b076..3b4873bdc8 100644 --- a/phpBB/includes/acp/acp_php_info.php +++ b/phpBB/includes/acp/acp_php_info.php @@ -45,7 +45,16 @@ class acp_php_info } $output = $output[1][0]; - $output = preg_replace('#<tr class="v"><td>(.*?<a[^>]*><img[^>]*></a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output); + + // expose_php can make the image not exist + if (preg_match('#<a[^>]*><img[^>]*></a>#', $output)) + { + $output = preg_replace('#<tr class="v"><td>(.*?<a[^>]*><img[^>]*></a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output); + } + else + { + $output = preg_replace('#<tr class="v"><td>(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\1</td></tr></table></td></tr>', $output); + } $output = preg_replace('#<table[^>]+>#i', '<table>', $output); $output = preg_replace('#<img border="0"#i', '<img', $output); $output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output); |