Skip to content

Instantly share code, notes, and snippets.

@nickvergessen
Created September 13, 2013 11:30
Show Gist options
  • Save nickvergessen/6549505 to your computer and use it in GitHub Desktop.
Save nickvergessen/6549505 to your computer and use it in GitHub Desktop.
ticket/11832
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 05d3c5f..6484dcc 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -813,7 +813,7 @@ function bbcode_nl2br($text)
*/
function smiley_text($text, $force_option = false)
{
- global $config, $user, $phpbb_root_path;
+ global $config, $user, $symfony_request, $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($symfony_request);
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment