mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Fix bug #45805 - INCLUDEPHP not depending on phpbb_root_path
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9633 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -132,6 +132,7 @@
|
||||
<li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
|
||||
<li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
|
||||
<li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
|
||||
<li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins.</li>
|
||||
<li>[Feature] Introduced new ACM plugins:
|
||||
|
@@ -640,7 +640,7 @@ class template_compile
|
||||
*/
|
||||
function compile_tag_include_php($tag_args)
|
||||
{
|
||||
return "include('" . $tag_args . "');";
|
||||
return "\$this->_php_include('$tag_args');";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -614,6 +614,25 @@ class template
|
||||
eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include a php-file
|
||||
* @access private
|
||||
*/
|
||||
function _php_include($filename)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$file = $phpbb_root_path . $filename;
|
||||
|
||||
if (!file_exists($file))
|
||||
{
|
||||
// trigger_error cannot be used here, as the output already started
|
||||
echo 'template->_php_include(): File ' . htmlspecialchars($file) . ' does not exist or is empty';
|
||||
return;
|
||||
}
|
||||
include($file);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user