mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
Merge pull request #6502 from marc1706/ticket/13276-master
[ticket/13276] Support PHPBB_USE_BOARD_URL_PATH in web root path -- master version
This commit is contained in:
commit
aac2cf5273
3 changed files with 3 additions and 8 deletions
|
@ -100,8 +100,7 @@ class upload extends \phpbb\avatar\driver\driver
|
|||
return false;
|
||||
}
|
||||
|
||||
$use_board = defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH;
|
||||
$web_path = $use_board ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
|
||||
$web_path = $this->path_helper->get_web_root_path();
|
||||
|
||||
$template->assign_vars([
|
||||
'AVATAR_ALLOWED_EXTENSIONS' => implode(',', preg_replace('/^/', '.', $this->allowed_extensions)),
|
||||
|
|
|
@ -231,8 +231,7 @@ class helper
|
|||
* We need to correct the phpBB root path in case this is called from a controller,
|
||||
* because the web path will be incorrect otherwise.
|
||||
*/
|
||||
$board_url = defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH;
|
||||
$web_path = $board_url ? generate_board_url() . '/' : $this->path_helper->get_web_root_path();
|
||||
$web_path = $this->path_helper->get_web_root_path();
|
||||
$style_path = rawurlencode($this->user->style['style_path']);
|
||||
|
||||
return "{$web_path}styles/{$style_path}/theme/images/no_avatar.gif";
|
||||
|
|
|
@ -95,15 +95,12 @@ class icon extends AbstractExtension
|
|||
$filesystem = $environment->get_filesystem();
|
||||
$root_path = $environment->get_web_root_path();
|
||||
|
||||
$board_url = defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH;
|
||||
$base_path = $board_url ? generate_board_url() . '/' : $root_path;
|
||||
|
||||
// Iterate over the user's styles and check for icon existance
|
||||
foreach ($this->get_style_list() as $style_path)
|
||||
{
|
||||
if ($filesystem->exists("{$root_path}styles/{$style_path}/theme/png/{$icon}.png"))
|
||||
{
|
||||
$source = "{$base_path}styles/{$style_path}/theme/png/{$icon}.png";
|
||||
$source = "{$root_path}styles/{$style_path}/theme/png/{$icon}.png";
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue