1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[ticket/11832] Fix smiley paths

PHPBB3-11832
This commit is contained in:
Nathan Guse 2013-09-13 09:56:00 -05:00
parent 8b2653dae3
commit f8e665751a

View File

@ -813,7 +813,7 @@ function bbcode_nl2br($text)
*/
function smiley_text($text, $force_option = false)
{
global $config, $user, $phpbb_root_path;
global $config, $user, $phpbb_filesystem;
if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{
@ -821,7 +821,7 @@ function smiley_text($text, $force_option = false)
}
else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_filesystem->get_web_root_path();
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}