diff options
Diffstat (limited to 'phpBB/modules/acp')
30 files changed, 217 insertions, 217 deletions
diff --git a/phpBB/modules/acp/acp_attachments.php b/phpBB/modules/acp/acp_attachments.php index a447ffd923..5e8e28a1ed 100644 --- a/phpBB/modules/acp/acp_attachments.php +++ b/phpBB/modules/acp/acp_attachments.php @@ -26,7 +26,7 @@ class acp_attachments function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang(array('posting', 'viewtopic', 'acp/attachments')); @@ -127,7 +127,7 @@ class acp_attachments ) ); - $this->new_config = $config; + $this->new_config = phpbb::$config; $cfg_array = (phpbb_request::is_set('config')) ? request_var('config', array('' => '')) : $this->new_config; $error = array(); @@ -517,7 +517,7 @@ class acp_attachments $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize); $allow_group = phpbb_request::is_set_post('allow_group'); - if ($max_filesize == $config['max_filesize']) + if ($max_filesize == phpbb::$config['max_filesize']) { $max_filesize = 0; } @@ -684,13 +684,13 @@ class acp_attachments if ($ext_group_row['max_filesize'] == 0) { - $ext_group_row['max_filesize'] = (int) $config['max_filesize']; + $ext_group_row['max_filesize'] = (int) phpbb::$config['max_filesize']; } $size_format = ($ext_group_row['max_filesize'] >= 1048576) ? 'mb' : (($ext_group_row['max_filesize'] >= 1024) ? 'kb' : 'b'); $ext_group_row['max_filesize'] = get_formatted_filesize($ext_group_row['max_filesize'], false); - $img_path = $config['upload_icons_path']; + $img_path = phpbb::$config['upload_icons_path']; $filename_list = ''; $no_image_select = false; @@ -1006,8 +1006,8 @@ class acp_attachments if ($files_added) { - set_config('upload_dir_size', $config['upload_dir_size'] + $space_taken, true); - set_config('num_files', $config['num_files'] + $files_added, true); + set_config('upload_dir_size', phpbb::$config['upload_dir_size'] + $space_taken, true); + set_config('num_files', phpbb::$config['num_files'] + $files_added, true); } } } diff --git a/phpBB/modules/acp/acp_ban.php b/phpBB/modules/acp/acp_ban.php index c6ce71371d..60f38c8e77 100644 --- a/phpBB/modules/acp/acp_ban.php +++ b/phpBB/modules/acp/acp_ban.php @@ -25,7 +25,7 @@ class acp_ban function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); diff --git a/phpBB/modules/acp/acp_bbcodes.php b/phpBB/modules/acp/acp_bbcodes.php index b76d4f5e27..cd10558261 100644 --- a/phpBB/modules/acp/acp_bbcodes.php +++ b/phpBB/modules/acp/acp_bbcodes.php @@ -25,7 +25,7 @@ class acp_bbcodes function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/posting'); diff --git a/phpBB/modules/acp/acp_board.php b/phpBB/modules/acp/acp_board.php index b428ef12d7..bc2dc2821c 100644 --- a/phpBB/modules/acp/acp_board.php +++ b/phpBB/modules/acp/acp_board.php @@ -27,7 +27,7 @@ class acp_board function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/board'); @@ -370,7 +370,7 @@ class acp_board $user->add_lang($display_vars['lang']); } - $this->new_config = $config; + $this->new_config = phpbb::$config; $cfg_array = (phpbb_request::is_set('config')) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config; $error = array(); @@ -452,7 +452,7 @@ class acp_board // Check if we need to create config fields for this plugin and save config when submit was pressed foreach ($fields['config'] as $field) { - if (!isset($config[$field])) + if (!isset(phpbb::$config[$field])) { set_config($field, ''); } @@ -689,10 +689,10 @@ class acp_board */ function select_acc_activation($value, $key = '') { - global $user, $config; + global $user; $radio_ary = array(USER_ACTIVATION_DISABLE => 'ACC_DISABLE', USER_ACTIVATION_NONE => 'ACC_NONE'); - if ($config['email_enable']) + if (phpbb::$config['email_enable']) { $radio_ary += array(USER_ACTIVATION_SELF => 'ACC_USER', USER_ACTIVATION_ADMIN => 'ACC_ADMIN'); } @@ -791,14 +791,14 @@ class acp_board */ function dateformat_select($value, $key) { - global $user, $config; + global $user; // Let the format_date function operate with the acp values $old_tz = $user->timezone; $old_dst = $user->dst; - $user->timezone = $config['board_timezone']; - $user->dst = $config['board_dst']; + $user->timezone = phpbb::$config['board_timezone']; + $user->dst = phpbb::$config['board_dst']; $dateformat_options = ''; diff --git a/phpBB/modules/acp/acp_bots.php b/phpBB/modules/acp/acp_bots.php index 7a23ca09c5..f4d78e7cc9 100644 --- a/phpBB/modules/acp/acp_bots.php +++ b/phpBB/modules/acp/acp_bots.php @@ -25,7 +25,7 @@ class acp_bots function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; $action = request_var('action', ''); $submit = phpbb_request::is_set_post('submit'); @@ -147,8 +147,8 @@ class acp_bots 'bot_agent' => request_var('bot_agent', ''), 'bot_ip' => request_var('bot_ip', ''), 'bot_active' => request_var('bot_active', true), - 'bot_lang' => request_var('bot_lang', $config['default_lang']), - 'bot_style' => request_var('bot_style' , $config['default_style']), + 'bot_lang' => request_var('bot_lang', phpbb::$config['default_lang']), + 'bot_style' => request_var('bot_style' , phpbb::$config['default_style']), ); if ($submit) diff --git a/phpBB/modules/acp/acp_captcha.php b/phpBB/modules/acp/acp_captcha.php index c45b6e8c36..2eedf4da7c 100644 --- a/phpBB/modules/acp/acp_captcha.php +++ b/phpBB/modules/acp/acp_captcha.php @@ -26,13 +26,13 @@ class acp_captcha function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/board'); include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT); - $selected = request_var('select_captcha', $config['captcha_plugin']); + $selected = request_var('select_captcha', phpbb::$config['captcha_plugin']); $configure = request_var('configure', false); // Oh, they are just here for the view @@ -70,15 +70,15 @@ class acp_captcha { set_config($config_var, request_var($config_var, false)); } - if ($selected !== $config['captcha_plugin']) + if ($selected !== phpbb::$config['captcha_plugin']) { // sanity check if (isset($captchas['available'][$selected])) { - $old_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $old_captcha = phpbb_captcha_factory::get_instance(phpbb::$config['captcha_plugin']); $old_captcha->uninstall(); set_config('captcha_plugin', $selected); - $new_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $new_captcha = phpbb_captcha_factory::get_instance(phpbb::$config['captcha_plugin']); $new_captcha->install(); } else @@ -127,7 +127,7 @@ class acp_captcha */ function deliver_demo($selected) { - global $db, $user, $config; + global $db, $user; $captcha = phpbb_captcha_factory::get_instance($selected); $captcha->init(CONFIRM_REG); diff --git a/phpBB/modules/acp/acp_database.php b/phpBB/modules/acp/acp_database.php index 837e7280e2..14e38bc697 100644 --- a/phpBB/modules/acp/acp_database.php +++ b/phpBB/modules/acp/acp_database.php @@ -25,7 +25,7 @@ class acp_database function main($id, $mode) { - global $db, $user, $auth, $template, $table_prefix, $config; + global $db, $user, $auth, $template, $table_prefix; $user->add_lang('acp/database'); diff --git a/phpBB/modules/acp/acp_disallow.php b/phpBB/modules/acp/acp_disallow.php index 507cbbdf15..5f3797ba29 100644 --- a/phpBB/modules/acp/acp_disallow.php +++ b/phpBB/modules/acp/acp_disallow.php @@ -25,7 +25,7 @@ class acp_disallow function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); diff --git a/phpBB/modules/acp/acp_email.php b/phpBB/modules/acp/acp_email.php index 3e9be9e34c..4626a607f3 100644 --- a/phpBB/modules/acp/acp_email.php +++ b/phpBB/modules/acp/acp_email.php @@ -25,7 +25,7 @@ class acp_email function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; $user->add_lang('acp/email'); $this->tpl_name = 'acp_email'; @@ -168,7 +168,7 @@ class acp_email $messenger->template('admin_send_email', $used_lang); - $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); + $messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']); $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); @@ -177,7 +177,7 @@ class acp_email $messenger->set_mail_priority($priority); $messenger->assign_vars(array( - 'CONTACT_EMAIL' => $config['board_contact'], + 'CONTACT_EMAIL' => phpbb::$config['board_contact'], 'MESSAGE' => htmlspecialchars_decode($message)) ); diff --git a/phpBB/modules/acp/acp_forums.php b/phpBB/modules/acp/acp_forums.php index 30a038c611..d568fd2caf 100644 --- a/phpBB/modules/acp/acp_forums.php +++ b/phpBB/modules/acp/acp_forums.php @@ -26,7 +26,7 @@ class acp_forums function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/forums'); $this->tpl_name = 'acp_forums'; @@ -1628,7 +1628,7 @@ class acp_forums */ function delete_forum_content($forum_id) { - global $db, $config; + global $db; include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT); diff --git a/phpBB/modules/acp/acp_groups.php b/phpBB/modules/acp/acp_groups.php index fce4ba7e55..408b0b33f7 100644 --- a/phpBB/modules/acp/acp_groups.php +++ b/phpBB/modules/acp/acp_groups.php @@ -25,7 +25,7 @@ class acp_groups function main($id, $mode) { - global $config, $db, $user, $auth, $template, $file_uploads; + global $db, $user, $auth, $template, $file_uploads; $user->add_lang('acp/groups'); $this->tpl_name = 'acp_groups'; @@ -48,7 +48,7 @@ class acp_groups // Clear some vars - $can_upload = (file_exists(PHPBB_ROOT_PATH . $config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && $file_uploads) ? true : false; $group_row = array(); // Grab basic data for group, if group_id is set and exists @@ -339,14 +339,14 @@ class acp_groups } } } - else if ($avatar_select && $config['allow_avatar_local']) + else if ($avatar_select && phpbb::$config['allow_avatar_local']) { // check avatar gallery - if (is_dir(PHPBB_ROOT_PATH . $config['avatar_gallery_path'] . '/' . $category)) + if (is_dir(PHPBB_ROOT_PATH . phpbb::$config['avatar_gallery_path'] . '/' . $category)) { $submit_ary['avatar_type'] = AVATAR_GALLERY; - list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize(PHPBB_ROOT_PATH . $config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select); + list($submit_ary['avatar_width'], $submit_ary['avatar_height']) = getimagesize(PHPBB_ROOT_PATH . phpbb::$config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_select); $submit_ary['avatar'] = $category . '/' . $avatar_select; } } @@ -358,21 +358,21 @@ class acp_groups else if ($data['width'] && $data['height']) { // Only update the dimensions? - if ($config['avatar_max_width'] || $config['avatar_max_height']) + if (phpbb::$config['avatar_max_width'] || phpbb::$config['avatar_max_height']) { - if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) + if ($data['width'] > phpbb::$config['avatar_max_width'] || $data['height'] > phpbb::$config['avatar_max_height']) { - $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); + $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], phpbb::$config['avatar_min_width'], phpbb::$config['avatar_min_height'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], $data['width'], $data['height']); } } if (!sizeof($error)) { - if ($config['avatar_min_width'] || $config['avatar_min_height']) + if (phpbb::$config['avatar_min_width'] || phpbb::$config['avatar_min_height']) { - if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height']) + if ($data['width'] < phpbb::$config['avatar_min_width'] || $data['height'] < phpbb::$config['avatar_min_height']) { - $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']); + $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], phpbb::$config['avatar_min_width'], phpbb::$config['avatar_min_height'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], $data['width'], $data['height']); } } } @@ -521,7 +521,7 @@ class acp_groups $display_gallery = phpbb_request::is_set_post('display_gallery'); - if ($config['allow_avatar_local'] && $display_gallery) + if (phpbb::$config['allow_avatar_local'] && $display_gallery) { avatar_gallery($category, $avatar_select, 4); } @@ -547,8 +547,8 @@ class acp_groups 'S_CAN_UPLOAD' => $can_upload, 'S_ERROR' => (sizeof($error)) ? true : false, 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false, - 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, - 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, + 'S_DISPLAY_GALLERY' => (phpbb::$config['allow_avatar_local'] && !$display_gallery) ? true : false, + 'S_IN_GALLERY' => (phpbb::$config['allow_avatar_local'] && $display_gallery) ? true : false, 'S_USER_FOUNDER' => ($user->data['user_type'] == phpbb::USER_FOUNDER) ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', @@ -571,7 +571,7 @@ class acp_groups 'S_GROUP_OPTIONS' => group_select_options(false, false, (($user->data['user_type'] == phpbb::USER_FOUNDER) ? false : 0)), 'AVATAR' => $avatar_img, 'AVATAR_IMAGE' => $avatar_img, - 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'], + 'AVATAR_MAX_FILESIZE' => phpbb::$config['avatar_filesize'], 'AVATAR_WIDTH' => (isset($group_row['group_avatar_width'])) ? $group_row['group_avatar_width'] : '', 'AVATAR_HEIGHT' => (isset($group_row['group_avatar_height'])) ? $group_row['group_avatar_height'] : '', @@ -589,7 +589,7 @@ class acp_groups 'U_BACK' => $u_back, 'U_SWATCH' => append_sid(PHPBB_ADMIN_PATH . 'swatch.' . PHP_EXT, 'form=settings&name=group_colour'), 'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id", - 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024)), + 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], round(phpbb::$config['avatar_filesize'] / 1024)), ) ); @@ -650,8 +650,8 @@ class acp_groups 'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false, 'S_ACTION_OPTIONS' => $s_action_options, - 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, $config['topics_per_page'], $start, true), + 'S_ON_PAGE' => on_page($total_members, phpbb::$config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&action=$action&g=$group_id", $total_members, phpbb::$config['topics_per_page'], $start, true), 'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'], 'U_ACTION' => $this->u_action . "&g=$group_id", @@ -667,7 +667,7 @@ class acp_groups AND u.user_id = ug.user_id AND ug.group_leader = 0 ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean"; - $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); + $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start); $pending = false; diff --git a/phpBB/modules/acp/acp_icons.php b/phpBB/modules/acp/acp_icons.php index c766ab5540..0badeafaf7 100644 --- a/phpBB/modules/acp/acp_icons.php +++ b/phpBB/modules/acp/acp_icons.php @@ -26,7 +26,7 @@ class acp_icons function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/posting'); @@ -48,14 +48,14 @@ class acp_icons $table = SMILIES_TABLE; $lang = 'SMILIES'; $fields = 'smiley'; - $img_path = $config['smilies_path']; + $img_path = phpbb::$config['smilies_path']; break; case 'icons': $table = ICONS_TABLE; $lang = 'ICONS'; $fields = 'icons'; - $img_path = $config['icons_path']; + $img_path = phpbb::$config['icons_path']; break; } diff --git a/phpBB/modules/acp/acp_inactive.php b/phpBB/modules/acp/acp_inactive.php index d1feaf4901..ef150748ae 100644 --- a/phpBB/modules/acp/acp_inactive.php +++ b/phpBB/modules/acp/acp_inactive.php @@ -31,7 +31,7 @@ class acp_inactive function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); @@ -76,7 +76,7 @@ class acp_inactive if ($action == 'activate') { - if ($config['require_activation'] == USER_ACTIVATION_ADMIN) + if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN) { // Get those 'being activated'... $sql = 'SELECT user_id, username, user_email, user_lang @@ -95,7 +95,7 @@ class acp_inactive user_active_flip('activate', $mark); - if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users)) + if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users)) { include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT); @@ -107,7 +107,7 @@ class acp_inactive $messenger->to($row['user_email'], $row['username']); - $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); + $messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']); $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); @@ -153,7 +153,7 @@ class acp_inactive break; case 'remind': - if (empty($config['email_enable'])) + if (empty(phpbb::$config['email_enable'])) { trigger_error($user->lang['EMAIL_DISABLED'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -216,7 +216,7 @@ class acp_inactive $inactive = array(); $inactive_count = 0; - $start = view_inactive_users($inactive, $inactive_count, $config['topics_per_page'], $start, $sql_where, $sql_sort); + $start = view_inactive_users($inactive, $inactive_count, phpbb::$config['topics_per_page'], $start, $sql_where, $sql_sort); foreach ($inactive as $row) { @@ -232,7 +232,7 @@ class acp_inactive } $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE'); - if ($config['email_enable']) + if (phpbb::$config['email_enable']) { $option_ary += array('remind' => 'REMIND'); } @@ -244,8 +244,8 @@ class acp_inactive 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, - 'S_ON_PAGE' => on_page($inactive_count, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $inactive_count, $config['topics_per_page'], $start, true), + 'S_ON_PAGE' => on_page($inactive_count, phpbb::$config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $inactive_count, phpbb::$config['topics_per_page'], $start, true), 'U_ACTION' => $this->u_action . '&start=' . $start, )); diff --git a/phpBB/modules/acp/acp_jabber.php b/phpBB/modules/acp/acp_jabber.php index cb8a6a3a83..a7f8da170c 100644 --- a/phpBB/modules/acp/acp_jabber.php +++ b/phpBB/modules/acp/acp_jabber.php @@ -26,7 +26,7 @@ class acp_jabber function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/board'); @@ -43,13 +43,13 @@ class acp_jabber $this->tpl_name = 'acp_jabber'; $this->page_title = 'ACP_JABBER_SETTINGS'; - $jab_enable = request_var('jab_enable', $config['jab_enable']); - $jab_host = request_var('jab_host', $config['jab_host']); - $jab_port = request_var('jab_port', $config['jab_port']); - $jab_username = request_var('jab_username', $config['jab_username']); - $jab_password = request_var('jab_password', $config['jab_password']); - $jab_package_size = request_var('jab_package_size', $config['jab_package_size']); - $jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']); + $jab_enable = request_var('jab_enable', phpbb::$config['jab_enable']); + $jab_host = request_var('jab_host', phpbb::$config['jab_host']); + $jab_port = request_var('jab_port', phpbb::$config['jab_port']); + $jab_username = request_var('jab_username', phpbb::$config['jab_username']); + $jab_password = request_var('jab_password', phpbb::$config['jab_password']); + $jab_package_size = request_var('jab_package_size', phpbb::$config['jab_package_size']); + $jab_use_ssl = request_var('jab_use_ssl', phpbb::$config['jab_use_ssl']); $form_name = 'acp_jabber'; add_form_key($form_name); diff --git a/phpBB/modules/acp/acp_language.php b/phpBB/modules/acp/acp_language.php index fd33057e07..71523dfa6d 100644 --- a/phpBB/modules/acp/acp_language.php +++ b/phpBB/modules/acp/acp_language.php @@ -31,7 +31,7 @@ class acp_language function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; global $safe_mode, $file_uploads; /** @@ -460,15 +460,15 @@ class acp_language $missing_vars = $missing_files = array(); // Get email templates - $email_files = filelist(PHPBB_ROOT_PATH . 'language/' . $config['default_lang'], 'email', 'txt'); + $email_files = filelist(PHPBB_ROOT_PATH . 'language/' . phpbb::$config['default_lang'], 'email', 'txt'); $email_files = $email_files['email/']; // Get acp files - $acp_files = filelist(PHPBB_ROOT_PATH . 'language/' . $config['default_lang'], 'acp', PHP_EXT); + $acp_files = filelist(PHPBB_ROOT_PATH . 'language/' . phpbb::$config['default_lang'], 'acp', PHP_EXT); $acp_files = $acp_files['acp/']; // Get mod files - $mods_files = filelist(PHPBB_ROOT_PATH . 'language/' . $config['default_lang'], 'mods', PHP_EXT); + $mods_files = filelist(PHPBB_ROOT_PATH . 'language/' . phpbb::$config['default_lang'], 'mods', PHP_EXT); $mods_files = (isset($mods_files['mods/'])) ? $mods_files['mods/'] : array(); // Check if our current filename matches the files @@ -536,7 +536,7 @@ class acp_language ); // If current lang is different from the default lang, then first try to grab missing/additional vars - if ($lang_iso != $config['default_lang']) + if ($lang_iso != phpbb::$config['default_lang']) { $is_missing_var = false; @@ -544,7 +544,7 @@ class acp_language { if (file_exists(PHPBB_ROOT_PATH . $this->get_filename($lang_iso, '', $file))) { - $missing_vars[$file] = $this->compare_language_files($config['default_lang'], $lang_iso, '', $file); + $missing_vars[$file] = $this->compare_language_files(phpbb::$config['default_lang'], $lang_iso, '', $file); if (sizeof($missing_vars[$file])) { @@ -562,7 +562,7 @@ class acp_language { if (file_exists(PHPBB_ROOT_PATH . $this->get_filename($lang_iso, 'acp', $file))) { - $missing_vars['acp/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'acp', $file); + $missing_vars['acp/' . $file] = $this->compare_language_files(phpbb::$config['default_lang'], $lang_iso, 'acp', $file); if (sizeof($missing_vars['acp/' . $file])) { @@ -581,7 +581,7 @@ class acp_language { if (file_exists(PHPBB_ROOT_PATH . $this->get_filename($lang_iso, 'mods', $file))) { - $missing_vars['mods/' . $file] = $this->compare_language_files($config['default_lang'], $lang_iso, 'mods', $file); + $missing_vars['mods/' . $file] = $this->compare_language_files(phpbb::$config['default_lang'], $lang_iso, 'mods', $file); if (sizeof($missing_vars['mods/' . $file])) { @@ -774,7 +774,7 @@ class acp_language $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if ($row['lang_iso'] == $config['default_lang']) + if ($row['lang_iso'] == phpbb::$config['default_lang']) { trigger_error($user->lang['NO_REMOVE_DEFAULT_LANG'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -782,7 +782,7 @@ class acp_language $db->sql_query('DELETE FROM ' . LANG_TABLE . ' WHERE lang_id = ' . $lang_id); $sql = 'UPDATE ' . USERS_TABLE . " - SET user_lang = '" . $db->sql_escape($config['default_lang']) . "' + SET user_lang = '" . $db->sql_escape(phpbb::$config['default_lang']) . "' WHERE user_lang = '" . $db->sql_escape($row['lang_iso']) . "'"; $db->sql_query($sql); @@ -914,7 +914,7 @@ class acp_language // Now let's copy the default language entries for custom profile fields for this new language - makes admin's life easier. $sql = 'SELECT lang_id FROM ' . LANG_TABLE . " - WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'"; + WHERE lang_iso = '" . $db->sql_escape(phpbb::$config['default_lang']) . "'"; $result = $db->sql_query($sql); $default_lang_id = (int) $db->sql_fetchfield('lang_id'); $db->sql_freeresult($result); @@ -1097,7 +1097,7 @@ class acp_language while ($row = $db->sql_fetchrow($result)) { $installed[] = $row['lang_iso']; - $tagstyle = ($row['lang_iso'] == $config['default_lang']) ? '*' : ''; + $tagstyle = ($row['lang_iso'] == phpbb::$config['default_lang']) ? '*' : ''; $template->assign_block_vars('lang', array( 'U_DETAILS' => $this->u_action . "&action=details&id={$row['lang_id']}", diff --git a/phpBB/modules/acp/acp_logs.php b/phpBB/modules/acp/acp_logs.php index 95442b336c..728ed1f878 100644 --- a/phpBB/modules/acp/acp_logs.php +++ b/phpBB/modules/acp/acp_logs.php @@ -25,7 +25,7 @@ class acp_logs function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('mcp'); @@ -122,15 +122,15 @@ class acp_logs // Grab log data $log_data = array(); $log_count = 0; - view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort); + view_log($mode, $log_data, $log_count, phpbb::$config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort); $template->assign_vars(array( 'L_TITLE' => $l_title, 'L_EXPLAIN' => $l_title_explain, 'U_ACTION' => $this->u_action, - 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true), + 'S_ON_PAGE' => on_page($log_count, phpbb::$config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, phpbb::$config['topics_per_page'], $start, true), 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, diff --git a/phpBB/modules/acp/acp_main.php b/phpBB/modules/acp/acp_main.php index 78ada1d09d..ee96eab767 100644 --- a/phpBB/modules/acp/acp_main.php +++ b/phpBB/modules/acp/acp_main.php @@ -25,7 +25,7 @@ class acp_main function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; // Show restore permissions notice if ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) @@ -210,7 +210,7 @@ class acp_main break; } - $step = ($config['num_posts']) ? (max((int) ($config['num_posts'] / 5), 20000)) : 20000; + $step = (phpbb::$config['num_posts']) ? (max((int) (phpbb::$config['num_posts'] / 5), 20000)) : 20000; $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0'); while ($start < $max_post_id) @@ -341,31 +341,31 @@ class acp_main } // Get forum statistics - $total_posts = $config['num_posts']; - $total_topics = $config['num_topics']; - $total_users = $config['num_users']; - $total_files = $config['num_files']; + $total_posts = phpbb::$config['num_posts']; + $total_topics = phpbb::$config['num_topics']; + $total_users = phpbb::$config['num_users']; + $total_files = phpbb::$config['num_files']; - $start_date = $user->format_date($config['board_startdate']); + $start_date = $user->format_date(phpbb::$config['board_startdate']); - $boarddays = (time() - $config['board_startdate']) / 86400; + $boarddays = (time() - phpbb::$config['board_startdate']) / 86400; $posts_per_day = sprintf('%.2f', $total_posts / $boarddays); $topics_per_day = sprintf('%.2f', $total_topics / $boarddays); $users_per_day = sprintf('%.2f', $total_users / $boarddays); $files_per_day = sprintf('%.2f', $total_files / $boarddays); - $upload_dir_size = get_formatted_filesize($config['upload_dir_size']); + $upload_dir_size = get_formatted_filesize(phpbb::$config['upload_dir_size']); $avatar_dir_size = 0; - if ($avatar_dir = @opendir(PHPBB_ROOT_PATH . $config['avatar_path'])) + if ($avatar_dir = @opendir(PHPBB_ROOT_PATH . phpbb::$config['avatar_path'])) { while (($file = readdir($avatar_dir)) !== false) { if ($file[0] != '.' && $file != 'CVS' && strpos($file, 'index.') === false) { - $avatar_dir_size += filesize(PHPBB_ROOT_PATH . $config['avatar_path'] . '/' . $file); + $avatar_dir_size += filesize(PHPBB_ROOT_PATH . phpbb::$config['avatar_path'] . '/' . $file); } } closedir($avatar_dir); @@ -398,7 +398,7 @@ class acp_main $files_per_day = $total_files; } - if ($config['allow_attachments'] || $config['allow_pm_attach']) + if (phpbb::$config['allow_attachments'] || phpbb::$config['allow_pm_attach']) { $sql = 'SELECT COUNT(attach_id) AS total_orphan FROM ' . ATTACHMENTS_TABLE . ' @@ -430,9 +430,9 @@ class acp_main 'UPLOAD_DIR_SIZE' => $upload_dir_size, 'TOTAL_ORPHAN' => $total_orphan, 'S_TOTAL_ORPHAN' => ($total_orphan === false) ? false : true, - 'GZIP_COMPRESSION' => ($config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'], + 'GZIP_COMPRESSION' => (phpbb::$config['gzip_compress']) ? $user->lang['ON'] : $user->lang['OFF'], 'DATABASE_INFO' => $db->sql_server_info(), - 'BOARD_VERSION' => $config['version'], + 'BOARD_VERSION' => phpbb::$config['version'], 'U_ACTION' => $this->u_action, 'U_ADMIN_LOG' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=logs&mode=admin'), @@ -482,7 +482,7 @@ class acp_main } $option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE'); - if ($config['email_enable']) + if (phpbb::$config['email_enable']) { $option_ary += array('remind' => 'REMIND'); } diff --git a/phpBB/modules/acp/acp_modules.php b/phpBB/modules/acp/acp_modules.php index e04961099c..bf5f17449b 100644 --- a/phpBB/modules/acp/acp_modules.php +++ b/phpBB/modules/acp/acp_modules.php @@ -43,7 +43,7 @@ class acp_modules function main($id, $mode) { - global $db, $user, $auth, $template, $module, $config; + global $db, $user, $auth, $template, $module; // Set a global define for modules we might include (the author is able to prevent execution of code by checking this constant) define('MODULE_INCLUDE', true); @@ -601,7 +601,7 @@ class acp_modules */ function make_module_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $ignore_noncat = false) { - global $db, $user, $auth, $config; + global $db, $user, $auth; $sql = 'SELECT module_id, module_enabled, module_basename, parent_id, module_langname, left_id, right_id, module_auth FROM ' . MODULES_TABLE . " diff --git a/phpBB/modules/acp/acp_permission_roles.php b/phpBB/modules/acp/acp_permission_roles.php index 8348c622c5..4b37bd01cc 100644 --- a/phpBB/modules/acp/acp_permission_roles.php +++ b/phpBB/modules/acp/acp_permission_roles.php @@ -25,7 +25,7 @@ class acp_permission_roles function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; include_once(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); include_once(PHPBB_ROOT_PATH . 'includes/acp/auth.' . PHP_EXT); diff --git a/phpBB/modules/acp/acp_permissions.php b/phpBB/modules/acp/acp_permissions.php index 8b3b424ce8..e3d7dafd12 100644 --- a/phpBB/modules/acp/acp_permissions.php +++ b/phpBB/modules/acp/acp_permissions.php @@ -26,7 +26,7 @@ class acp_permissions function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; include_once(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); include_once(PHPBB_ROOT_PATH . 'includes/acp/auth.' . PHP_EXT); @@ -79,7 +79,7 @@ class acp_permissions if ($select_all_groups) { // Add default groups to selection - $sql_and = (!$config['coppa_enable']) ? " AND group_name <> 'REGISTERED_COPPA'" : ''; + $sql_and = (!phpbb::$config['coppa_enable']) ? " AND group_name <> 'REGISTERED_COPPA'" : ''; $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . ' diff --git a/phpBB/modules/acp/acp_php_info.php b/phpBB/modules/acp/acp_php_info.php index 3df63edc17..0e042bebe0 100644 --- a/phpBB/modules/acp/acp_php_info.php +++ b/phpBB/modules/acp/acp_php_info.php @@ -25,7 +25,7 @@ class acp_php_info function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; if ($mode != 'info') { @@ -34,7 +34,7 @@ class acp_php_info $this->tpl_name = 'acp_php_info'; $this->page_title = 'ACP_PHP_INFO'; - + ob_start(); @phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); $phpinfo = ob_get_clean(); diff --git a/phpBB/modules/acp/acp_profile.php b/phpBB/modules/acp/acp_profile.php index 75bbd1ab14..529f84de94 100644 --- a/phpBB/modules/acp/acp_profile.php +++ b/phpBB/modules/acp/acp_profile.php @@ -28,7 +28,7 @@ class acp_profile function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; include(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT); include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); @@ -217,7 +217,7 @@ class acp_profile $sql = 'SELECT lang_id FROM ' . LANG_TABLE . " - WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'"; + WHERE lang_iso = '" . $db->sql_escape(phpbb::$config['default_lang']) . "'"; $result = $db->sql_query($sql); $default_lang_id = (int) $db->sql_fetchfield('lang_id'); $db->sql_freeresult($result); @@ -291,7 +291,7 @@ class acp_profile $save = phpbb_request::is_set('save'); // The language id of default language - $this->edit_lang_id = $this->lang_defs['iso'][$config['default_lang']]; + $this->edit_lang_id = $this->lang_defs['iso'][phpbb::$config['default_lang']]; // We are editing... we need to grab basic things if ($action == 'edit') @@ -741,7 +741,7 @@ class acp_profile 'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false, 'S_FIELD_NO_VIEW' => ($cp->vars['field_no_view']) ? true : false, - 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], $config['default_lang']), + 'L_LANG_SPECIFIC' => sprintf($user->lang['LANG_SPECIFIC_OPTIONS'], phpbb::$config['default_lang']), 'FIELD_TYPE' => $user->lang['FIELD_' . strtoupper(custom_profile::$profile_types[$field_type])], 'FIELD_IDENT' => $cp->vars['field_ident'], 'LANG_NAME' => $cp->vars['lang_name'], @@ -902,9 +902,9 @@ class acp_profile */ function build_language_options(&$cp, $field_type, $action = 'create') { - global $user, $config, $db; + global $user, $db; - $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']]; + $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][phpbb::$config['default_lang']]; $sql = 'SELECT lang_id, lang_iso FROM ' . LANG_TABLE . ' @@ -1022,14 +1022,14 @@ class acp_profile */ function save_profile_field(&$cp, $field_type, $action = 'create') { - global $db, $config, $user; + global $db, $user; $field_id = request_var('field_id', 0); // Collect all information, if something is going wrong, abort the operation $profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array(); - $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][$config['default_lang']]; + $default_lang_id = (!empty($this->edit_lang_id)) ? $this->edit_lang_id : $this->lang_defs['iso'][phpbb::$config['default_lang']]; if ($action == 'create') { diff --git a/phpBB/modules/acp/acp_prune.php b/phpBB/modules/acp/acp_prune.php index 0f6fa9933d..c901f03269 100644 --- a/phpBB/modules/acp/acp_prune.php +++ b/phpBB/modules/acp/acp_prune.php @@ -51,7 +51,7 @@ class acp_prune */ function prune_forums($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $all_forums = request_var('all_forums', 0); $forum_id = request_var('f', array(0)); @@ -227,7 +227,7 @@ class acp_prune */ function prune_users($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('memberlist'); diff --git a/phpBB/modules/acp/acp_ranks.php b/phpBB/modules/acp/acp_ranks.php index 64ed46cc96..92510525b7 100644 --- a/phpBB/modules/acp/acp_ranks.php +++ b/phpBB/modules/acp/acp_ranks.php @@ -25,7 +25,7 @@ class acp_ranks function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/posting'); @@ -156,7 +156,7 @@ class acp_ranks } $db->sql_freeresult($result); - $imglist = filelist(PHPBB_ROOT_PATH . $config['ranks_path'], ''); + $imglist = filelist(PHPBB_ROOT_PATH . phpbb::$config['ranks_path'], ''); $edit_img = $filename_list = ''; foreach ($imglist as $path => $img_ary) @@ -195,12 +195,12 @@ class acp_ranks $template->assign_vars(array( 'S_EDIT' => true, 'U_BACK' => $this->u_action, - 'RANKS_PATH' => PHPBB_ROOT_PATH . $config['ranks_path'], + 'RANKS_PATH' => PHPBB_ROOT_PATH . phpbb::$config['ranks_path'], 'U_ACTION' => $this->u_action . '&id=' . $rank_id, 'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '', 'S_FILENAME_LIST' => $filename_list, - 'RANK_IMAGE' => ($edit_img) ? PHPBB_ROOT_PATH . $config['ranks_path'] . '/' . $edit_img : PHPBB_ADMIN_PATH . 'images/spacer.gif', + 'RANK_IMAGE' => ($edit_img) ? PHPBB_ROOT_PATH . phpbb::$config['ranks_path'] . '/' . $edit_img : PHPBB_ADMIN_PATH . 'images/spacer.gif', 'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false, 'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0) ); @@ -226,7 +226,7 @@ class acp_ranks 'S_RANK_IMAGE' => ($row['rank_image']) ? true : false, 'S_SPECIAL_RANK' => ($row['rank_special']) ? true : false, - 'RANK_IMAGE' => PHPBB_ROOT_PATH . $config['ranks_path'] . '/' . $row['rank_image'], + 'RANK_IMAGE' => PHPBB_ROOT_PATH . phpbb::$config['ranks_path'] . '/' . $row['rank_image'], 'RANK_TITLE' => $row['rank_title'], 'MIN_POSTS' => $row['rank_min'], diff --git a/phpBB/modules/acp/acp_reasons.php b/phpBB/modules/acp/acp_reasons.php index 1c80fcfa40..7f21bd27bd 100644 --- a/phpBB/modules/acp/acp_reasons.php +++ b/phpBB/modules/acp/acp_reasons.php @@ -25,7 +25,7 @@ class acp_reasons function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang(array('mcp', 'acp/posting')); diff --git a/phpBB/modules/acp/acp_search.php b/phpBB/modules/acp/acp_search.php index 380890ec64..029d9300ad 100644 --- a/phpBB/modules/acp/acp_search.php +++ b/phpBB/modules/acp/acp_search.php @@ -50,7 +50,7 @@ class acp_search function settings($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $submit = phpbb_request::is_set_post('submit'); @@ -76,7 +76,7 @@ class acp_search } $name = ucfirst(strtolower(str_replace('_', ' ', $type))); - $selected = ($config['search_type'] == $type) ? ' selected="selected"' : ''; + $selected = (phpbb::$config['search_type'] == $type) ? ' selected="selected"' : ''; $search_options .= '<option value="' . $type . '"' . $selected . '>' . $name . '</option>'; if (method_exists($search, 'acp')) @@ -126,7 +126,7 @@ class acp_search } // only change config if anything was actually changed - if ($submit && ($config[$config_name] != $config_value)) + if ($submit && (phpbb::$config[$config_name] != $config_value)) { set_config($config_name, $config_value); $updated = true; @@ -141,7 +141,7 @@ class acp_search add_log('admin', 'LOG_CONFIG_SEARCH'); } - if (isset($cfg_array['search_type']) && in_array($cfg_array['search_type'], $search_types, true) && ($cfg_array['search_type'] != $config['search_type'])) + if (isset($cfg_array['search_type']) && in_array($cfg_array['search_type'], $search_types, true) && ($cfg_array['search_type'] != phpbb::$config['search_type'])) { $search = null; $error = false; @@ -184,7 +184,7 @@ class acp_search $search = null; $error = false; - if (!$this->init_search($config['search_type'], $search, $error)) + if (!$this->init_search(phpbb::$config['search_type'], $search, $error)) { if ($updated) { @@ -210,14 +210,14 @@ class acp_search $this->page_title = 'ACP_SEARCH_SETTINGS'; $template->assign_vars(array( - 'LIMIT_SEARCH_LOAD' => (float) $config['limit_search_load'], - 'MIN_SEARCH_AUTHOR_CHARS' => (int) $config['min_search_author_chars'], - 'SEARCH_INTERVAL' => (float) $config['search_interval'], - 'SEARCH_GUEST_INTERVAL' => (float) $config['search_anonymous_interval'], - 'SEARCH_STORE_RESULTS' => (int) $config['search_store_results'], + 'LIMIT_SEARCH_LOAD' => (float) phpbb::$config['limit_search_load'], + 'MIN_SEARCH_AUTHOR_CHARS' => (int) phpbb::$config['min_search_author_chars'], + 'SEARCH_INTERVAL' => (float) phpbb::$config['search_interval'], + 'SEARCH_GUEST_INTERVAL' => (float) phpbb::$config['search_anonymous_interval'], + 'SEARCH_STORE_RESULTS' => (int) phpbb::$config['search_store_results'], 'S_SEARCH_TYPES' => $search_options, - 'S_YES_SEARCH' => (bool) $config['load_search'], + 'S_YES_SEARCH' => (bool) phpbb::$config['load_search'], 'S_SETTINGS' => true, 'U_ACTION' => $this->u_action) @@ -226,7 +226,7 @@ class acp_search function index($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $action = request_var('action', array('' => false)); if (sizeof($action)) @@ -237,7 +237,7 @@ class acp_search { $action = request_var('action', ''); } - $this->state = explode(',', $config['search_indexing_state']); + $this->state = explode(',', phpbb::$config['search_indexing_state']); if (phpbb_request::is_set_post('cancel')) { @@ -407,10 +407,10 @@ class acp_search // pretend the number of posts was as big as the number of ids we indexed so far // just an estimation as it includes deleted posts - $num_posts = $config['num_posts']; - $config['num_posts'] = min($config['num_posts'], $post_counter); + $num_posts = phpbb::$config['num_posts']; + phpbb::$config['num_posts'] = min(phpbb::$config['num_posts'], $post_counter); $this->search->tidy(); - $config['num_posts'] = $num_posts; + phpbb::$config['num_posts'] = $num_posts; if ($post_counter <= $this->max_post_id) { @@ -471,7 +471,7 @@ class acp_search 'L_NAME' => $name, 'NAME' => $type, - 'S_ACTIVE' => ($type == $config['search_type']) ? true : false, + 'S_ACTIVE' => ($type == phpbb::$config['search_type']) ? true : false, 'S_HIDDEN_FIELDS' => build_hidden_fields(array('search_type' => $type)), 'S_INDEXED' => (bool) $search->index_created(), 'S_STATS' => (bool) sizeof($statistics)) diff --git a/phpBB/modules/acp/acp_styles.php b/phpBB/modules/acp/acp_styles.php index 17c33c9c82..061de5ae76 100644 --- a/phpBB/modules/acp/acp_styles.php +++ b/phpBB/modules/acp/acp_styles.php @@ -31,7 +31,7 @@ class acp_styles function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; // Hardcoded template bitfield to add for new templates $bitfield = new bitfield(); @@ -192,7 +192,7 @@ parse_css_file = {PARSE_CSS_FILE} case 'activate': case 'deactivate': - if ($style_id == $config['default_style']) + if ($style_id == phpbb::$config['default_style']) { trigger_error($user->lang['DEACTIVATE_DEFAULT'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -206,7 +206,7 @@ parse_css_file = {PARSE_CSS_FILE} if ($action == 'deactivate') { $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_style = ' . $config['default_style'] . " + SET user_style = ' . phpbb::$config['default_style'] . " WHERE user_style = $style_id"; $db->sql_query($sql); @@ -474,7 +474,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function frontend($mode, $options, $actions) { - global $user, $template, $db, $config; + global $user, $template, $db; $sql_from = ''; $style_count = array(); @@ -557,7 +557,7 @@ parse_css_file = {PARSE_CSS_FILE} } $template->assign_block_vars('installed', array( - 'S_DEFAULT_STYLE' => ($mode == 'style' && $row['style_id'] == $config['default_style']) ? true : false, + 'S_DEFAULT_STYLE' => ($mode == 'style' && $row['style_id'] == phpbb::$config['default_style']) ? true : false, 'U_EDIT' => $this->u_action . '&action=' . (($mode == 'style') ? 'details' : 'edit') . '&id=' . $row[$mode . '_id'], 'U_STYLE_ACT_DEACT' => $this->u_action . '&action=' . $stylevis . '&id=' . $row[$mode . '_id'], 'L_STYLE_ACT_DEACT' => $user->lang['STYLE_' . strtoupper($stylevis)], @@ -631,7 +631,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function edit_template($template_id) { - global $config, $db, $user, $template, $safe_mode; + global $db, $user, $template, $safe_mode; if (defined('PHPBB_DISABLE_ACP_EDITOR')) { @@ -801,7 +801,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function template_cache($template_id) { - global $config, $db, $user, $template; + global $db, $user, $template; $source = str_replace('/', '.', request_var('source', '')); $file_ary = array_diff(request_var('delete', array('')), array('')); @@ -920,7 +920,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function edit_theme($theme_id) { - global $config, $db, $user, $template, $safe_mode; + global $db, $user, $template, $safe_mode; $this->page_title = 'EDIT_THEME'; @@ -1376,7 +1376,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function remove($mode, $style_id) { - global $db, $template, $user, $config; + global $db, $template, $user; $new_id = request_var('new_id', 0); $update = phpbb_request::is_set_post('update'); @@ -1461,7 +1461,7 @@ parse_css_file = {PARSE_CSS_FILE} WHERE forum_style = $style_id"; $db->sql_query($sql); - if ($style_id == $config['default_style']) + if ($style_id == phpbb::$config['default_style']) { set_config('default_style', $new_id); } @@ -1512,7 +1512,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function export($mode, $style_id) { - global $db, $template, $user, $config; + global $db, $template, $user; $update = phpbb_request::is_set_post('update'); @@ -1620,7 +1620,7 @@ parse_css_file = {PARSE_CSS_FILE} if ($mode == 'style') { - $style_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['style_name'], $style_row['style_copyright'], $config['version']), $this->style_cfg); + $style_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['style_name'], $style_row['style_copyright'], phpbb::$config['version']), $this->style_cfg); $style_cfg .= (!$inc_template) ? "\nrequired_template = {$style_row['template_name']}" : ''; $style_cfg .= (!$inc_theme) ? "\nrequired_theme = {$style_row['theme_name']}" : ''; @@ -1637,7 +1637,7 @@ parse_css_file = {PARSE_CSS_FILE} // Export template core code if ($mode == 'template' || $inc_template) { - $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg); + $template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], phpbb::$config['version']), $this->template_cfg); $data[] = array( 'src' => $template_cfg, @@ -1657,7 +1657,7 @@ parse_css_file = {PARSE_CSS_FILE} // Export theme core code if ($mode == 'theme' || $inc_theme) { - $theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], $config['version']), $this->theme_cfg); + $theme_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['theme_name'], $style_row['theme_copyright'], phpbb::$config['version']), $this->theme_cfg); // Read old cfg file $items = phpbb_cache::obtain_cfg_item($style_row, 'theme'); @@ -1695,7 +1695,7 @@ parse_css_file = {PARSE_CSS_FILE} // Export imageset core code if ($mode == 'imageset' || $inc_imageset) { - $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg); + $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], phpbb::$config['version']), $this->imageset_cfg); $imageset_main = array(); @@ -1764,7 +1764,7 @@ parse_css_file = {PARSE_CSS_FILE} foreach ($imageset_lang as $lang => $imageset_localized) { - $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], $config['version']), $this->imageset_cfg); + $imageset_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['imageset_name'], $style_row['imageset_copyright'], phpbb::$config['version']), $this->imageset_cfg); foreach ($this->imageset_keys as $topic => $key_array) { @@ -1909,7 +1909,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function details($mode, $style_id) { - global $template, $db, $config, $user, $safe_mode; + global $template, $db, $user, $safe_mode; $update = phpbb_request::is_set_post('update'); $l_type = strtoupper($mode); @@ -1948,7 +1948,7 @@ parse_css_file = {PARSE_CSS_FILE} trigger_error($user->lang['NO_' . $l_type] . adm_back_link($this->u_action), E_USER_WARNING); } - $style_row['style_default'] = ($mode == 'style' && $config['default_style'] == $style_id) ? 1 : 0; + $style_row['style_default'] = ($mode == 'style' && phpbb::$config['default_style'] == $style_id) ? 1 : 0; if ($update) { @@ -1975,7 +1975,7 @@ parse_css_file = {PARSE_CSS_FILE} $error[] = $user->lang['STYLE_ERR_NO_IDS']; } - if ($mode == 'style' && $style_row['style_active'] && !$style_active && $config['default_style'] == $style_id) + if ($mode == 'style' && $style_row['style_active'] && !$style_active && phpbb::$config['default_style'] == $style_id) { $error[] = $user->lang['DEACTIVATE_DEFAULT']; } @@ -2260,7 +2260,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function install($mode) { - global $config, $db, $user, $template; + global $db, $user, $template; $l_type = strtoupper($mode); @@ -2415,7 +2415,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function add($mode) { - global $config, $db, $user, $template; + global $db, $user, $template; $l_type = strtoupper($mode); $element_ary = array('template' => STYLES_TEMPLATE_TABLE, 'theme' => STYLES_THEME_TABLE, 'imageset' => STYLES_IMAGESET_TABLE); @@ -2563,7 +2563,7 @@ parse_css_file = {PARSE_CSS_FILE} function generate_stylesheets($theme) { - global $db, $config; + global $db; // get all the lang_dirs $sql = 'SELECT lang_dir @@ -2590,7 +2590,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 : phpbb::$config['default_lang']; // Parse Theme Data $replace = array( @@ -2750,7 +2750,7 @@ parse_css_file = {PARSE_CSS_FILE} */ function install_style(&$error, $action, $root_path, &$id, $name, $path, $copyright, $active, $default, &$style_row, $template_root_path = false, $template_path = false, $theme_root_path = false, $theme_path = false, $imageset_root_path = false, $imageset_path = false) { - global $config, $db, $user; + global $db, $user; $element_ary = array('template', 'theme', 'imageset'); @@ -2829,7 +2829,7 @@ parse_css_file = {PARSE_CSS_FILE} { $sql = 'UPDATE ' . USERS_TABLE . " SET user_style = $id - WHERE user_style = " . $config['default_style']; + WHERE user_style = " . phpbb::$config['default_style']; $db->sql_query($sql); set_config('default_style', $id); diff --git a/phpBB/modules/acp/acp_update.php b/phpBB/modules/acp/acp_update.php index d021fe5e09..ca18a23b16 100644 --- a/phpBB/modules/acp/acp_update.php +++ b/phpBB/modules/acp/acp_update.php @@ -25,7 +25,7 @@ class acp_update function main($id, $mode) { - global $config, $db, $user, $auth, $template; + global $db, $user, $auth, $template; $user->add_lang('install'); @@ -57,10 +57,10 @@ class acp_update $version_update_from = (string) $db->sql_fetchfield('config_value'); $db->sql_freeresult($result); - $current_version = (!empty($version_update_from)) ? $version_update_from : $config['version']; + $current_version = (!empty($version_update_from)) ? $version_update_from : phpbb::$config['version']; $up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; - $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; + $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower(phpbb::$config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true; $template->assign_vars(array( 'S_UP_TO_DATE' => $up_to_date, @@ -69,7 +69,7 @@ class acp_update 'U_ACTION' => $this->u_action, 'LATEST_VERSION' => $latest_version, - 'CURRENT_VERSION' => $config['version'], + 'CURRENT_VERSION' => phpbb::$config['version'], 'AUTO_VERSION' => $version_update_from, 'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $announcement_url, $update_link), diff --git a/phpBB/modules/acp/acp_users.php b/phpBB/modules/acp/acp_users.php index 0cb973058c..02940154b9 100644 --- a/phpBB/modules/acp/acp_users.php +++ b/phpBB/modules/acp/acp_users.php @@ -31,7 +31,7 @@ class acp_users function main($id, $mode) { - global $config, $db, $user, $auth, $template, $file_uploads; + global $db, $user, $auth, $template, $file_uploads; $user->add_lang(array('posting', 'ucp', 'acp/users')); $this->tpl_name = 'acp_users'; @@ -300,7 +300,7 @@ class acp_users trigger_error($user->lang['CANNOT_FORCE_REACT_BOT'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - if ($config['email_enable']) + if (phpbb::$config['email_enable']) { include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT); @@ -338,13 +338,13 @@ class acp_users $messenger->to($user_row['user_email'], $user_row['username']); - $messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']); + $messenger->headers('X-AntiAbuse: Board servername - ' . phpbb::$config['server_name']); $messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']); $messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']); $messenger->headers('X-AntiAbuse: User IP - ' . $user->ip); $messenger->assign_vars(array( - 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])), + 'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], phpbb::$config['sitename'])), 'USERNAME' => htmlspecialchars_decode($user_row['username']), 'U_ACTIVATE' => "$server_url/ucp." . PHP_EXT . "?mode=activate&u={$user_row['user_id']}&k=$user_actkey") ); @@ -664,9 +664,9 @@ class acp_users // Validation data - we do not check the password complexity setting here $check_ary = array( 'new_password' => array( - array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + array('string', true, phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']), array('password')), - 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + 'password_confirm' => array('string', true, phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']), ); // Check username if altered @@ -674,7 +674,7 @@ class acp_users { $check_ary += array( 'username' => array( - array('string', false, $config['min_name_chars'], $config['max_name_chars']), + array('string', false, phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']), array('username', $user_row['username']) ), ); @@ -837,7 +837,7 @@ class acp_users $quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH'); - if ($config['email_enable'] && ($user_row['user_type'] == phpbb::USER_NORMAL || $user_row['user_type'] == phpbb::USER_INACTIVE)) + if (phpbb::$config['email_enable'] && ($user_row['user_type'] == phpbb::USER_NORMAL || $user_row['user_type'] == phpbb::USER_INACTIVE)) { $quick_tool_ary['reactivate'] = 'FORCE'; } @@ -849,7 +849,7 @@ class acp_users $s_action_options .= '<option value="' . $value . '">' . $user->lang['USER_ADMIN_' . $lang] . '</option>'; } - if ($config['load_onlinetrack']) + if (phpbb::$config['load_onlinetrack']) { $sql = 'SELECT MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline FROM ' . SESSIONS_TABLE . " @@ -900,8 +900,8 @@ class acp_users $db->sql_freeresult($result); $template->assign_vars(array( - 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']), - 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']), + 'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[phpbb::$config['allow_name_chars'] . '_EXPLAIN'], phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']), + 'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[phpbb::$config['pass_complex'] . '_EXPLAIN'], phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']), 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']), 'S_FOUNDER' => ($user->data['user_type'] == phpbb::USER_FOUNDER) ? true : false, @@ -1007,12 +1007,12 @@ class acp_users // Grab log data $log_data = array(); $log_count = 0; - view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort); + view_log('user', $log_data, $log_count, phpbb::$config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort); $template->assign_vars(array( 'S_FEEDBACK' => true, - 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start), - 'PAGINATION' => generate_pagination($this->u_action . "&u=$user_id&$u_sort_param", $log_count, $config['topics_per_page'], $start, true), + 'S_ON_PAGE' => on_page($log_count, phpbb::$config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&u=$user_id&$u_sort_param", $log_count, phpbb::$config['topics_per_page'], $start, true), 'S_LIMIT_DAYS' => $s_limit_days, 'S_SORT_KEY' => $s_sort_key, @@ -1403,7 +1403,7 @@ class acp_users $template->assign_vars(array( 'S_PREFS' => true, - 'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true, + 'S_JABBER_DISABLED' => (phpbb::$config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true, 'VIEW_EMAIL' => $data['viewemail'], 'MASS_EMAIL' => $data['massemail'], @@ -1436,8 +1436,8 @@ class acp_users 'DATE_FORMAT' => $data['dateformat'], 'S_DATEFORMAT_OPTIONS' => $dateformat_options, 'S_CUSTOM_DATEFORMAT' => $s_custom, - 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], - 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']), + 'DEFAULT_DATEFORMAT' => phpbb::$config['default_dateformat'], + 'A_DEFAULT_DATEFORMAT' => addslashes(phpbb::$config['default_dateformat']), 'S_LANG_OPTIONS' => language_select($data['lang']), 'S_STYLE_OPTIONS' => style_select($data['style']), @@ -1452,7 +1452,7 @@ class acp_users include(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT); include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); - $can_upload = (file_exists(PHPBB_ROOT_PATH . $config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . $config['avatar_path']) && $file_uploads) ? true : false; + $can_upload = (file_exists(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && $file_uploads) ? true : false; if ($submit) { @@ -1478,24 +1478,24 @@ class acp_users $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); - if ($config['allow_avatar_local'] && $display_gallery) + if (phpbb::$config['allow_avatar_local'] && $display_gallery) { avatar_gallery($category, $avatar_select, 4); } $template->assign_vars(array( 'S_AVATAR' => true, - 'S_CAN_UPLOAD' => ($can_upload && $config['allow_avatar_upload']) ? true : false, - 'S_ALLOW_REMOTE' => ($config['allow_avatar_remote']) ? true : false, - 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, - 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, + 'S_CAN_UPLOAD' => ($can_upload && phpbb::$config['allow_avatar_upload']) ? true : false, + 'S_ALLOW_REMOTE' => (phpbb::$config['allow_avatar_remote']) ? true : false, + 'S_DISPLAY_GALLERY' => (phpbb::$config['allow_avatar_local'] && !$display_gallery) ? true : false, + 'S_IN_GALLERY' => (phpbb::$config['allow_avatar_local'] && $display_gallery) ? true : false, 'AVATAR_IMAGE' => $avatar_img, - 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'], + 'AVATAR_MAX_FILESIZE' => phpbb::$config['avatar_filesize'], 'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'], 'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'], - 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], round($config['avatar_filesize'] / 1024))) + 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], round(phpbb::$config['avatar_filesize'] / 1024))) ); break; @@ -1546,9 +1546,9 @@ class acp_users include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT); include_once(PHPBB_ROOT_PATH . 'includes/functions_display.' . PHP_EXT); - $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false; - $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false; - $enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false; + $enable_bbcode = (phpbb::$config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false; + $enable_smilies = (phpbb::$config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false; + $enable_urls = (phpbb::$config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false; $signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true)); $preview = phpbb_request::is_set_post('preview'); @@ -1560,7 +1560,7 @@ class acp_users $message_parser = new parse_message($signature); // Allowing Quote BBCode - $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); + $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, phpbb::$config['allow_sig_img'], phpbb::$config['allow_sig_flash'], true, phpbb::$config['allow_sig_links'], true, 'sig'); if (sizeof($message_parser->warn_msg)) { @@ -1613,19 +1613,19 @@ class acp_users 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '', 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '', - 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>'), - 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], - 'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], - 'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], - 'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], + 'BBCODE_STATUS' => (phpbb::$config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid('faq', 'mode=bbcode') . '">', '</a>'), + 'SMILIES_STATUS' => (phpbb::$config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], + 'IMG_STATUS' => (phpbb::$config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], + 'FLASH_STATUS' => (phpbb::$config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], + 'URL_STATUS' => (phpbb::$config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], - 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']), + 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['SIGNATURE_EXPLAIN'], phpbb::$config['max_sig_chars']), - 'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'], - 'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'], - 'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false, - 'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false, - 'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false) + 'S_BBCODE_ALLOWED' => phpbb::$config['allow_sig_bbcode'], + 'S_SMILIES_ALLOWED' => phpbb::$config['allow_sig_smilies'], + 'S_BBCODE_IMG' => (phpbb::$config['allow_sig_img']) ? true : false, + 'S_BBCODE_FLASH' => (phpbb::$config['allow_sig_flash']) ? true : false, + 'S_LINKS_ALLOWED' => (phpbb::$config['allow_sig_links']) ? true : false) ); // Assigning custom bbcodes @@ -1739,7 +1739,7 @@ class acp_users WHERE a.poster_id = ' . $user_id . " AND a.is_orphan = 0 ORDER BY $order_by"; - $result = $db->sql_query_limit($sql, $config['posts_per_page'], $start); + $result = $db->sql_query_limit($sql, phpbb::$config['posts_per_page'], $start); while ($row = $db->sql_fetchrow($result)) { @@ -1775,11 +1775,11 @@ class acp_users $template->assign_vars(array( 'S_ATTACHMENTS' => true, - 'S_ON_PAGE' => on_page($num_attachments, $config['topics_per_page'], $start), + 'S_ON_PAGE' => on_page($num_attachments, phpbb::$config['topics_per_page'], $start), 'S_SORT_KEY' => $s_sort_key, 'S_SORT_DIR' => $s_sort_dir, - 'PAGINATION' => generate_pagination($this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true)) + 'PAGINATION' => generate_pagination($this->u_action . "&u=$user_id&sk=$sort_key&sd=$sort_dir", $num_attachments, phpbb::$config['topics_per_page'], $start, true)) ); break; @@ -1915,7 +1915,7 @@ class acp_users $s_group_options = ''; while ($row = $db->sql_fetchrow($result)) { - if (!$config['coppa_enable'] && $row['group_name'] == 'REGISTERED_COPPA') + if (!phpbb::$config['coppa_enable'] && $row['group_name'] == 'REGISTERED_COPPA') { continue; } diff --git a/phpBB/modules/acp/acp_words.php b/phpBB/modules/acp/acp_words.php index 61728c01af..87989640ec 100644 --- a/phpBB/modules/acp/acp_words.php +++ b/phpBB/modules/acp/acp_words.php @@ -26,7 +26,7 @@ class acp_words function main($id, $mode) { - global $db, $user, $auth, $template, $config; + global $db, $user, $auth, $template; $user->add_lang('acp/posting'); |