aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_php_info.php
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-07-30 18:47:54 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-07-30 18:47:54 -0400
commit5653be8e1604022d0e912162686ede5c8d5c68d1 (patch)
treee1eedb265b090d27d08def7adb0754e527d914ec /phpBB/includes/acp/acp_php_info.php
parent7ebec68616efe4ed86ae2e42561c0ed8ce5b58df (diff)
parent381ebcf195499c2656b7fc3e49b14a665320ba4b (diff)
downloadforums-5653be8e1604022d0e912162686ede5c8d5c68d1.tar
forums-5653be8e1604022d0e912162686ede5c8d5c68d1.tar.gz
forums-5653be8e1604022d0e912162686ede5c8d5c68d1.tar.bz2
forums-5653be8e1604022d0e912162686ede5c8d5c68d1.tar.xz
forums-5653be8e1604022d0e912162686ede5c8d5c68d1.zip
Merge remote-tracking branch 'callumacrae/ticket/9645' into develop-olympus
* callumacrae/ticket/9645: [ticket/9645] Added code to repair invalid anchor names in acp_php_info.
Diffstat (limited to 'phpBB/includes/acp/acp_php_info.php')
-rw-r--r--phpBB/includes/acp/acp_php_info.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 0499095004..7dd345971a 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -67,6 +67,9 @@ class acp_php_info
$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);
+ // Fix invalid anchor names (eg "module_Zend Optimizer")
+ $output = preg_replace_callback('#<a name="([^"]+)">#', array($this, 'remove_spaces'), $output);
+
if (empty($output))
{
trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
@@ -79,6 +82,11 @@ class acp_php_info
$template->assign_var('PHPINFO', $output);
}
+
+ function remove_spaces($matches)
+ {
+ return '<a name="' . str_replace(' ', '_', $matches[1]) . '">';
+ }
}
?> \ No newline at end of file