diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index 80bc1eb935..60e478b19d 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -2861,7 +2861,7 @@ parse_css_file = {PARSE_CSS_FILE} function generate_stylesheets($theme) { - global $db, $phpbb_root_path, $config; + global $db, $config; // get all the lang_dirs $sql = 'SELECT lang_dir @@ -2888,7 +2888,7 @@ parse_css_file = {PARSE_CSS_FILE} $theme['imageset_id'] = $theme_row['imageset_id']; $theme['template_path'] = $theme_row['template_path']; - $user_image_lang = (file_exists($phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $lang_dir)) ? $lang_dir : $config['default_lang']; + $user_image_lang = (file_exists(PHPBB_ROOT_PATH . 'styles/' . $theme['imageset_path'] . '/imageset/' . $lang_dir)) ? $lang_dir : $config['default_lang']; // Parse Theme Data $replace = array( @@ -2938,7 +2938,7 @@ parse_css_file = {PARSE_CSS_FILE} $img_data = &$img_array[$img]; $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename']; $imgs[$img] = array( - 'src' => $phpbb_root_path . 'styles/' . $theme['imageset_path'] . '/imageset/' . $imgsrc, + 'src' => './styles/' . $theme['imageset_path'] . '/imageset/' . $imgsrc, 'width' => $img_data['image_width'], 'height' => $img_data['image_height'], ); @@ -2968,7 +2968,7 @@ parse_css_file = {PARSE_CSS_FILE} $specific_theme_data = str_replace($find, $replace, $specific_theme_data); } } - file_put_contents($phpbb_root_path . '/store/' . $theme['theme_id'] . '_' . $theme['imageset_id'] . '_' . $lang_dir . '.css', $specific_theme_data, LOCK_EX); + file_put_contents(PHPBB_ROOT_PATH . '/store/' . $theme['theme_id'] . '_' . $theme['imageset_id'] . '_' . $lang_dir . '.css', $specific_theme_data, LOCK_EX); } } $db->sql_freeresult($result); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index ff16616863..099e680cae 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3416,7 +3416,7 @@ function page_header($page_title = '', $display_online_list = true) 'T_ICONS_PATH' => PHPBB_ROOT_PATH . $config['icons_path'] . '/', 'T_RANKS_PATH' => PHPBB_ROOT_PATH . $config['ranks_path'] . '/', 'T_UPLOAD_PATH' => PHPBB_ROOT_PATH . $config['upload_path'] . '/', - 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? PHPBB_ROOT_PATH . 'styles/' . $user->theme['theme_path'] . '/theme/stylesheet.css' : PHPBB_ROOT_PATH . 'style.' . PHP_EXT . "?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], //"{$phpbb_root_path}store/{$user->theme['theme_id']}_{$user->theme['imageset_id']}_{$user->lang_name}.css" + 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? PHPBB_ROOT_PATH . 'styles/' . $user->theme['theme_path'] . '/theme/stylesheet.css' : PHPBB_ROOT_PATH . 'style.' . PHP_EXT . "?sid=$user->session_id&id=" . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], //PHPBB_ROOT_PATH . "store/{$user->theme['theme_id']}_{$user->theme['imageset_id']}_{$user->lang_name}.css" 'T_STYLESHEET_NAME' => $user->theme['theme_name'], 'SITE_LOGO_IMG' => $user->img('site_logo'))