From 57065095d570f0ff5976470ce81a4b216fe5f98e Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 3 Apr 2012 00:41:56 +0300 Subject: [PATCH] [ticket/10754] Changing $style to $phpbb_style Renaming global variable $style to $phpbb_style PHPBB3-10754 --- phpBB/adm/index.php | 4 ++-- phpBB/common.php | 2 +- phpBB/includes/functions_messenger.php | 4 ++-- phpBB/includes/user.php | 4 ++-- phpBB/install/index.php | 6 +++--- phpBB/install/install_update.php | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index 91894e5aec..e20bbe4bec 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -51,8 +51,8 @@ $module_id = request_var('i', ''); $mode = request_var('mode', ''); // Set custom style for admin area -$style->set_ext_dir_prefix('adm/'); -$style->set_custom_style('admin', $phpbb_admin_path . 'style', ''); +$phpbb_style->set_ext_dir_prefix('adm/'); +$phpbb_style->set_custom_style('admin', $phpbb_admin_path . 'style', ''); $template->assign_var('T_ASSETS_PATH', $phpbb_root_path . 'assets'); $template->assign_var('T_TEMPLATE_PATH', $phpbb_admin_path . 'style'); diff --git a/phpBB/common.php b/phpBB/common.php index b3b8d7e4f7..a00e3e82a8 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -125,7 +125,7 @@ $phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_ro $phpbb_style_resource_locator = new phpbb_style_resource_locator(); $phpbb_style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider()); $template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider); -$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); +$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_subscriber_loader = new phpbb_event_extension_subscriber_loader($phpbb_dispatcher, $phpbb_extension_manager); $phpbb_subscriber_loader->load(); diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index aae200df55..f608c95fe4 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -211,7 +211,7 @@ class messenger $style_resource_locator = new phpbb_style_resource_locator(); $style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider()); $tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider); - $stl = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl); + $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl); $this->tpl_msg[$template_lang . $template_file] = $tpl; $fallback_template_path = false; @@ -230,7 +230,7 @@ class messenger } } - $stl->set_custom_style($template_lang . '_email', array($template_path, $fallback_template_path), ''); + $style->set_custom_style($template_lang . '_email', array($template_path, $fallback_template_path), ''); $tpl->set_filenames(array( 'body' => $template_file . '.txt', diff --git a/phpBB/includes/user.php b/phpBB/includes/user.php index 1676f82ccb..ce9c804f23 100644 --- a/phpBB/includes/user.php +++ b/phpBB/includes/user.php @@ -72,7 +72,7 @@ class phpbb_user extends phpbb_session */ function setup($lang_set = false, $style_id = false) { - global $db, $style, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache; + global $db, $phpbb_style, $template, $config, $auth, $phpEx, $phpbb_root_path, $cache; if ($this->data['user_id'] != ANONYMOUS) { @@ -206,7 +206,7 @@ class phpbb_user extends phpbb_session } } - $style->set_style(); + $phpbb_style->set_style(); $this->img_lang = $this->lang_name; diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 13ab30a9fa..bb10521bba 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -203,9 +203,9 @@ $config = new phpbb_config(array( $phpbb_style_resource_locator = new phpbb_style_resource_locator(); $phpbb_style_path_provider = new phpbb_style_path_provider(); $template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider); -$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); -$style->set_ext_dir_prefix('adm/'); -$style->set_custom_style('admin', '../adm/style', ''); +$phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); +$phpbb_style->set_ext_dir_prefix('adm/'); +$phpbb_style->set_custom_style('admin', '../adm/style', ''); $template->assign_var('T_ASSETS_PATH', '../assets'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index dcf01e5cc8..c2feaa086a 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -131,7 +131,7 @@ class install_update extends module } // Set custom template again. ;) - $style->set_custom_style('admin', '../adm/style', ''); + $phpbb_style->set_custom_style('admin', '../adm/style', ''); $template->assign_vars(array( 'S_USER_LANG' => $user->lang['USER_LANG'],