aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/modules
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/modules')
-rw-r--r--phpBB/modules/acp/acp_attachments.php14
-rw-r--r--phpBB/modules/acp/acp_ban.php2
-rw-r--r--phpBB/modules/acp/acp_bbcodes.php2
-rw-r--r--phpBB/modules/acp/acp_board.php16
-rw-r--r--phpBB/modules/acp/acp_bots.php6
-rw-r--r--phpBB/modules/acp/acp_captcha.php12
-rw-r--r--phpBB/modules/acp/acp_database.php2
-rw-r--r--phpBB/modules/acp/acp_disallow.php2
-rw-r--r--phpBB/modules/acp/acp_email.php6
-rw-r--r--phpBB/modules/acp/acp_forums.php4
-rw-r--r--phpBB/modules/acp/acp_groups.php38
-rw-r--r--phpBB/modules/acp/acp_icons.php6
-rw-r--r--phpBB/modules/acp/acp_inactive.php18
-rw-r--r--phpBB/modules/acp/acp_jabber.php16
-rw-r--r--phpBB/modules/acp/acp_language.php24
-rw-r--r--phpBB/modules/acp/acp_logs.php8
-rw-r--r--phpBB/modules/acp/acp_main.php30
-rw-r--r--phpBB/modules/acp/acp_modules.php4
-rw-r--r--phpBB/modules/acp/acp_permission_roles.php2
-rw-r--r--phpBB/modules/acp/acp_permissions.php4
-rw-r--r--phpBB/modules/acp/acp_php_info.php4
-rw-r--r--phpBB/modules/acp/acp_profile.php16
-rw-r--r--phpBB/modules/acp/acp_prune.php4
-rw-r--r--phpBB/modules/acp/acp_ranks.php10
-rw-r--r--phpBB/modules/acp/acp_reasons.php2
-rw-r--r--phpBB/modules/acp/acp_search.php34
-rw-r--r--phpBB/modules/acp/acp_styles.php50
-rw-r--r--phpBB/modules/acp/acp_update.php8
-rw-r--r--phpBB/modules/acp/acp_users.php88
-rw-r--r--phpBB/modules/acp/acp_words.php2
-rw-r--r--phpBB/modules/mcp/mcp_ban.php2
-rw-r--r--phpBB/modules/mcp/mcp_forum.php8
-rw-r--r--phpBB/modules/mcp/mcp_front.php4
-rw-r--r--phpBB/modules/mcp/mcp_logs.php10
-rw-r--r--phpBB/modules/mcp/mcp_main.php8
-rw-r--r--phpBB/modules/mcp/mcp_notes.php10
-rw-r--r--phpBB/modules/mcp/mcp_post.php12
-rw-r--r--phpBB/modules/mcp/mcp_queue.php22
-rw-r--r--phpBB/modules/mcp/mcp_reports.php12
-rw-r--r--phpBB/modules/mcp/mcp_topic.php10
-rw-r--r--phpBB/modules/mcp/mcp_warn.php24
-rw-r--r--phpBB/modules/ucp/ucp_activate.php6
-rw-r--r--phpBB/modules/ucp/ucp_attachments.php8
-rw-r--r--phpBB/modules/ucp/ucp_confirm.php4
-rw-r--r--phpBB/modules/ucp/ucp_groups.php40
-rw-r--r--phpBB/modules/ucp/ucp_main.php46
-rw-r--r--phpBB/modules/ucp/ucp_pm.php4
-rw-r--r--phpBB/modules/ucp/ucp_pm_compose.php68
-rw-r--r--phpBB/modules/ucp/ucp_pm_options.php16
-rw-r--r--phpBB/modules/ucp/ucp_pm_viewfolder.php24
-rw-r--r--phpBB/modules/ucp/ucp_pm_viewmessage.php28
-rw-r--r--phpBB/modules/ucp/ucp_prefs.php14
-rw-r--r--phpBB/modules/ucp/ucp_profile.php92
-rw-r--r--phpBB/modules/ucp/ucp_register.php78
-rw-r--r--phpBB/modules/ucp/ucp_remind.php4
-rw-r--r--phpBB/modules/ucp/ucp_resend.php20
-rw-r--r--phpBB/modules/ucp/ucp_zebra.php2
57 files changed, 505 insertions, 505 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&amp;name=group_colour'),
'U_ACTION' => "{$this->u_action}&amp;action=$action&amp;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 . "&amp;action=$action&amp;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 . "&amp;action=$action&amp;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 . "&amp;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 . "&amp;$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 . "&amp;$u_sort_param", $inactive_count, phpbb::$config['topics_per_page'], $start, true),
'U_ACTION' => $this->u_action . '&amp;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 . "&amp;action=details&amp;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 . "&amp;$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 . "&amp;$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&amp;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 . '&amp;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 . '&amp;action=' . (($mode == 'style') ? 'details' : 'edit') . '&amp;id=' . $row[$mode . '_id'],
'U_STYLE_ACT_DEACT' => $this->u_action . '&amp;action=' . $stylevis . '&amp;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 . '&amp;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 . "&amp;u=$user_id&amp;$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 . "&amp;u=$user_id&amp;$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 . "&amp;u=$user_id&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start, true))
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;u=$user_id&amp;sk=$sort_key&amp;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');
diff --git a/phpBB/modules/mcp/mcp_ban.php b/phpBB/modules/mcp/mcp_ban.php
index f4f3708799..35535711e2 100644
--- a/phpBB/modules/mcp/mcp_ban.php
+++ b/phpBB/modules/mcp/mcp_ban.php
@@ -25,7 +25,7 @@ class mcp_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/mcp/mcp_forum.php b/phpBB/modules/mcp/mcp_forum.php
index 2f90e99e93..346d29d34b 100644
--- a/phpBB/modules/mcp/mcp_forum.php
+++ b/phpBB/modules/mcp/mcp_forum.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function mcp_forum_view($id, $mode, $action, $forum_info)
{
- global $template, $db, $user, $auth, $module, $config;
+ global $template, $db, $user, $auth, $module;
$user->add_lang(array('viewtopic', 'viewforum'));
@@ -90,7 +90,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
make_jumpbox($url . "&amp;i=$id&amp;action=$action&amp;mode=$mode" . (($merge_select) ? $selected_ids : ''), $forum_id, false, 'm_', true);
- $topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : $config['topics_per_page'];
+ $topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : phpbb::$config['topics_per_page'];
$sort_days = $total = 0;
$sort_key = $sort_dir = '';
@@ -138,7 +138,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$topic_rows = array();
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$read_tracking_join = ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')';
$read_tracking_select = ', tt.mark_time';
@@ -184,7 +184,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
// Get topic tracking info
if (sizeof($topic_list))
{
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$topic_tracking_info = get_topic_tracking($forum_id, $topic_list, $topic_rows, array($forum_id => $forum_info['mark_time']), array());
}
diff --git a/phpBB/modules/mcp/mcp_front.php b/phpBB/modules/mcp/mcp_front.php
index 4b229c616f..ad30774e2f 100644
--- a/phpBB/modules/mcp/mcp_front.php
+++ b/phpBB/modules/mcp/mcp_front.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function mcp_front_view($id, $mode, $action)
{
- global $template, $db, $user, $auth, $module, $config;
+ global $template, $db, $user, $auth, $module;
// Latest 5 unapproved
if ($module->loaded('queue'))
@@ -33,7 +33,7 @@ function mcp_front_view($id, $mode, $action)
$forum_id = request_var('f', 0);
$template->assign_var('S_SHOW_UNAPPROVED', (!empty($forum_list)) ? true : false);
-
+
if (!empty($forum_list))
{
$sql = 'SELECT COUNT(post_id) AS total
diff --git a/phpBB/modules/mcp/mcp_logs.php b/phpBB/modules/mcp/mcp_logs.php
index 22b413279f..b91a7906b8 100644
--- a/phpBB/modules/mcp/mcp_logs.php
+++ b/phpBB/modules/mcp/mcp_logs.php
@@ -33,7 +33,7 @@ class mcp_logs
function main($id, $mode)
{
- global $auth, $db, $user, $template, $config;
+ global $auth, $db, $user, $template;
$user->add_lang('acp/common');
@@ -166,12 +166,12 @@ class mcp_logs
// Grab log data
$log_data = array();
$log_count = 0;
- view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort);
+ view_log('mod', $log_data, $log_count, phpbb::$config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort);
$template->assign_vars(array(
- 'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($log_count, phpbb::$config['topics_per_page'], $start),
'TOTAL' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param", $log_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;$u_sort_param", $log_count, phpbb::$config['topics_per_page'], $start),
'L_TITLE' => $user->lang['MCP_LOGS'],
@@ -187,7 +187,7 @@ class mcp_logs
foreach ($log_data as $row)
{
$data = array();
-
+
$checks = array('viewtopic', 'viewforum');
foreach ($checks as $check)
{
diff --git a/phpBB/modules/mcp/mcp_main.php b/phpBB/modules/mcp/mcp_main.php
index 71bdc78b0f..a3d5ae8a46 100644
--- a/phpBB/modules/mcp/mcp_main.php
+++ b/phpBB/modules/mcp/mcp_main.php
@@ -33,7 +33,7 @@ class mcp_main
function main($id, $mode)
{
- global $auth, $db, $user, $template, $action, $config;
+ global $auth, $db, $user, $template, $action;
$quickmod = ($mode == 'quickmod') ? true : false;
@@ -931,7 +931,7 @@ function mcp_delete_post($post_ids)
*/
function mcp_fork_topic($topic_ids)
{
- global $auth, $user, $db, $template, $config;
+ global $auth, $user, $db, $template;
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
{
@@ -1174,8 +1174,8 @@ function mcp_fork_topic($topic_ids)
}
sync('forum', 'forum_id', $to_forum_id);
- set_config('num_topics', $config['num_topics'] + sizeof($new_topic_id_list), true);
- set_config('num_posts', $config['num_posts'] + $total_posts, true);
+ set_config('num_topics', phpbb::$config['num_topics'] + sizeof($new_topic_id_list), true);
+ set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
foreach ($new_topic_id_list as $topic_id => $new_topic_id)
{
diff --git a/phpBB/modules/mcp/mcp_notes.php b/phpBB/modules/mcp/mcp_notes.php
index 5ca3d8f606..dbd61dfb40 100644
--- a/phpBB/modules/mcp/mcp_notes.php
+++ b/phpBB/modules/mcp/mcp_notes.php
@@ -33,7 +33,7 @@ class mcp_notes
function main($id, $mode)
{
- global $auth, $db, $user, $template, $config;
+ global $auth, $db, $user, $template;
$action = request_var('action', array('' => ''));
@@ -71,7 +71,7 @@ class mcp_notes
*/
function mcp_notes_user_view($action)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$user_id = request_var('u', 0);
$username = request_var('username', '', true);
@@ -193,7 +193,7 @@ class mcp_notes
$log_data = array();
$log_count = 0;
- view_log('user', $log_data, $log_count, $config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
+ view_log('user', $log_data, $log_count, phpbb::$config['posts_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
if ($log_count)
{
@@ -220,8 +220,8 @@ class mcp_notes
'L_TITLE' => $user->lang['MCP_NOTES_USER'],
- 'PAGE_NUMBER' => on_page($log_count, $config['posts_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$st&amp;sk=$sk&amp;sd=$sd", $log_count, $config['posts_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($log_count, phpbb::$config['posts_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;st=$st&amp;sk=$sk&amp;sd=$sd", $log_count, phpbb::$config['posts_per_page'], $start),
'TOTAL_REPORTS' => ($log_count == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $log_count),
'USERNAME' => $userrow['username'],
diff --git a/phpBB/modules/mcp/mcp_post.php b/phpBB/modules/mcp/mcp_post.php
index b296c3626f..8d4a4683cc 100644
--- a/phpBB/modules/mcp/mcp_post.php
+++ b/phpBB/modules/mcp/mcp_post.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function mcp_post_details($id, $mode, $action)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$user->add_lang('posting');
@@ -112,7 +112,7 @@ function mcp_post_details($id, $mode, $action)
$topic_tracking_info = array();
// Get topic tracking info
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$tmp_topic_data = array($post_info['topic_id'] => $post_info);
$topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
@@ -228,7 +228,7 @@ function mcp_post_details($id, $mode, $action)
// Get User Notes
$log_data = array();
$log_count = 0;
- view_log('user', $log_data, $log_count, $config['posts_per_page'], 0, 0, 0, $post_info['user_id']);
+ view_log('user', $log_data, $log_count, phpbb::$config['posts_per_page'], 0, 0, 0, $post_info['user_id']);
if ($log_count)
{
@@ -394,7 +394,7 @@ function mcp_post_details($id, $mode, $action)
*/
function change_poster(&$post_info, $userdata)
{
- global $auth, $db, $config;
+ global $auth, $db;
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
{
@@ -434,7 +434,7 @@ function change_poster(&$post_info, $userdata)
markread('post', $post_info['forum_id'], $post_info['topic_id'], time(), $userdata['user_id']);
// Remove the dotted topic option if the old user has no more posts within this topic
- if ($config['load_db_track'] && $post_info['user_id'] != ANONYMOUS)
+ if (phpbb::$config['load_db_track'] && $post_info['user_id'] != ANONYMOUS)
{
$sql = 'SELECT topic_id
FROM ' . POSTS_TABLE . '
@@ -465,7 +465,7 @@ function change_poster(&$post_info, $userdata)
}
// refresh search cache of this post
- $search_type = basename($config['search_type']);
+ $search_type = basename(phpbb::$config['search_type']);
if (file_exists(PHPBB_ROOT_PATH . 'includes/search/' . $search_type . '.' . PHP_EXT))
{
diff --git a/phpBB/modules/mcp/mcp_queue.php b/phpBB/modules/mcp/mcp_queue.php
index eefeb08f3d..1d122b8581 100644
--- a/phpBB/modules/mcp/mcp_queue.php
+++ b/phpBB/modules/mcp/mcp_queue.php
@@ -34,7 +34,7 @@ class mcp_queue
function main($id, $mode)
{
global $auth, $db, $user, $template;
- global $config, $action;
+ global $action;
include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
@@ -112,7 +112,7 @@ class mcp_queue
$extensions = $attachments = $topic_tracking_info = array();
// Get topic tracking info
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$tmp_topic_data = array($post_info['topic_id'] => $post_info);
$topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
@@ -320,7 +320,7 @@ class mcp_queue
AND t.topic_first_post_id <> p.post_id
$limit_time_sql
ORDER BY $sort_order_sql";
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start);
$i = 0;
$post_ids = array();
@@ -371,7 +371,7 @@ class mcp_queue
AND topic_approved = 0
$limit_time_sql
ORDER BY $sort_order_sql";
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start);
$rowset = array();
while ($row = $db->sql_fetchrow($result))
@@ -445,8 +445,8 @@ class mcp_queue
'S_MCP_ACTION' => build_url(array('t', 'f', 'sd', 'st', 'sk')),
'S_TOPICS' => ($mode == 'unapproved_posts') ? false : true,
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, phpbb::$config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total, phpbb::$config['topics_per_page'], $start),
'TOPIC_ID' => $topic_id,
'TOTAL' => ($total == 1) ? (($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POST'] : $user->lang['VIEW_FORUM_TOPIC']) : sprintf((($mode == 'unapproved_posts') ? $user->lang['VIEW_TOPIC_POSTS'] : $user->lang['VIEW_FORUM_TOPICS']), $total),
));
@@ -462,7 +462,7 @@ class mcp_queue
*/
function approve_post($post_id_list, $id, $mode)
{
- global $db, $template, $user, $config;
+ global $db, $template, $user;
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
@@ -651,12 +651,12 @@ function approve_post($post_id_list, $id, $mode)
if ($total_topics)
{
- set_config('num_topics', $config['num_topics'] + $total_topics, true);
+ set_config('num_topics', phpbb::$config['num_topics'] + $total_topics, true);
}
if ($total_posts)
{
- set_config('num_posts', $config['num_posts'] + $total_posts, true);
+ set_config('num_posts', phpbb::$config['num_posts'] + $total_posts, true);
}
unset($topic_approve_sql, $topic_replies_sql, $post_approve_sql);
@@ -703,7 +703,7 @@ function approve_post($post_id_list, $id, $mode)
$messenger->save_queue();
// Send out normal user notifications
- $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']);
+ $email_sig = str_replace('<br />', "\n", "-- \n" . phpbb::$config['board_email_sig']);
foreach ($post_info as $post_id => $post_data)
{
@@ -787,7 +787,7 @@ function approve_post($post_id_list, $id, $mode)
*/
function disapprove_post($post_id_list, $id, $mode)
{
- global $db, $template, $user, $config;
+ global $db, $template, $user;
if (!check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
{
diff --git a/phpBB/modules/mcp/mcp_reports.php b/phpBB/modules/mcp/mcp_reports.php
index a86e156438..fc48a24482 100644
--- a/phpBB/modules/mcp/mcp_reports.php
+++ b/phpBB/modules/mcp/mcp_reports.php
@@ -34,7 +34,7 @@ class mcp_reports
function main($id, $mode)
{
global $auth, $db, $user, $template;
- global $config, $action;
+ global $action;
include_once(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
@@ -121,7 +121,7 @@ class mcp_reports
$topic_tracking_info = $extensions = $attachments = array();
// Get topic tracking info
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$tmp_topic_data = array($post_info['topic_id'] => $post_info);
$topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
@@ -351,7 +351,7 @@ class mcp_reports
AND t.topic_id = p.topic_id
$limit_time_sql
ORDER BY $sort_order_sql";
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start);
$i = 0;
$report_ids = array();
@@ -421,8 +421,8 @@ class mcp_reports
'S_FORUM_OPTIONS' => $forum_options,
'S_CLOSED' => ($mode == 'reports_closed') ? true : false,
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;f=$forum_id&amp;t=$topic_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir", $total, phpbb::$config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($total, phpbb::$config['topics_per_page'], $start),
'TOPIC_ID' => $topic_id,
'TOTAL' => $total,
'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
@@ -440,7 +440,7 @@ class mcp_reports
*/
function close_report($report_id_list, $mode, $action)
{
- global $db, $template, $user, $config;
+ global $db, $template, $user;
$sql = 'SELECT r.post_id
FROM ' . REPORTS_TABLE . ' r
diff --git a/phpBB/modules/mcp/mcp_topic.php b/phpBB/modules/mcp/mcp_topic.php
index 22675a8c84..9da64df6f9 100644
--- a/phpBB/modules/mcp/mcp_topic.php
+++ b/phpBB/modules/mcp/mcp_topic.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function mcp_topic_view($id, $mode, $action)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$url = append_sid(PHPBB_ROOT_PATH. 'mcp.' . PHP_EXT . '?' . extra_url());
@@ -108,7 +108,7 @@ function mcp_topic_view($id, $mode, $action)
$total = $topic_info['topic_replies'] + 1;
}
- $posts_per_page = max(0, request_var('posts_per_page', intval($config['posts_per_page'])));
+ $posts_per_page = max(0, request_var('posts_per_page', intval(phpbb::$config['posts_per_page'])));
if ($posts_per_page == 0)
{
$posts_per_page = $total;
@@ -154,7 +154,7 @@ function mcp_topic_view($id, $mode, $action)
$topic_tracking_info = array();
// Get topic tracking info
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$tmp_topic_data = array($topic_id => $topic_info);
$topic_tracking_info = get_topic_tracking($topic_info['forum_id'], $topic_id, $tmp_topic_data, array($topic_info['forum_id'] => $topic_info['forum_mark_time']));
@@ -336,7 +336,7 @@ function mcp_topic_view($id, $mode, $action)
*/
function split_topic($action, $topic_id, $to_forum_id, $subject)
{
- global $db, $template, $user, $auth, $config;
+ global $db, $template, $user, $auth;
$post_id_list = request_var('post_id_list', array(0));
$forum_id = request_var('forum_id', 0);
@@ -500,7 +500,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$success_msg = 'TOPIC_SPLIT_SUCCESS';
// Update forum statistics
- set_config('num_topics', $config['num_topics'] + 1, true);
+ set_config('num_topics', phpbb::$config['num_topics'] + 1, true);
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
diff --git a/phpBB/modules/mcp/mcp_warn.php b/phpBB/modules/mcp/mcp_warn.php
index 959b90079c..48515a6c64 100644
--- a/phpBB/modules/mcp/mcp_warn.php
+++ b/phpBB/modules/mcp/mcp_warn.php
@@ -33,7 +33,7 @@ class mcp_warn
function main($id, $mode)
{
- global $auth, $db, $user, $template, $config;
+ global $auth, $db, $user, $template;
$action = request_var('action', array('' => ''));
@@ -75,7 +75,7 @@ class mcp_warn
*/
function mcp_warn_front_view()
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$template->assign_vars(array(
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&amp;form=mcp&amp;field=username&amp;select_single=true'),
@@ -133,7 +133,7 @@ class mcp_warn
*/
function mcp_warn_list_view($action)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$user->add_lang('memberlist');
@@ -156,7 +156,7 @@ class mcp_warn
$users = array();
$user_count = 0;
- view_warned_users($users, $user_count, $config['topics_per_page'], $start, $sql_where, $sql_sort);
+ view_warned_users($users, $user_count, phpbb::$config['topics_per_page'], $start, $sql_where, $sql_sort);
foreach ($users as $row)
{
@@ -180,8 +180,8 @@ class mcp_warn
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,
- 'PAGE_NUMBER' => on_page($user_count, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination(append_sid('mcp', "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd"), $user_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($user_count, phpbb::$config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination(append_sid('mcp', "i=warn&amp;mode=list&amp;st=$st&amp;sk=$sk&amp;sd=$sd"), $user_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_USERS' => ($user_count == 1) ? $user->lang['LIST_USER'] : sprintf($user->lang['LIST_USERS'], $user_count),
));
}
@@ -191,7 +191,7 @@ class mcp_warn
*/
function mcp_warn_post_view($action)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
$post_id = request_var('p', 0);
$forum_id = request_var('f', 0);
@@ -246,7 +246,7 @@ class mcp_warn
}
// Check if can send a notification
- if ($config['allow_privmsg'])
+ if (phpbb::$config['allow_privmsg'])
{
$auth2 = new auth();
$auth2->acl($user_row);
@@ -332,7 +332,7 @@ class mcp_warn
*/
function mcp_warn_user_view($action)
{
- global $config, $module;
+ global $module;
global $template, $db, $user, $auth;
$user_id = request_var('u', 0);
@@ -369,7 +369,7 @@ class mcp_warn
}
// Check if can send a notification
- if ($config['allow_privmsg'])
+ if (phpbb::$config['allow_privmsg'])
{
$auth2 = new auth();
$auth2->acl($user_row);
@@ -438,14 +438,14 @@ class mcp_warn
*/
function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
{
- global $template, $db, $user, $auth, $config;
+ global $template, $db, $user, $auth;
if ($send_pm)
{
include_once(PHPBB_ROOT_PATH . 'includes/functions_privmsgs.' . PHP_EXT);
include_once(PHPBB_ROOT_PATH . 'includes/message_parser.' . PHP_EXT);
- $user_row['user_lang'] = (file_exists(PHPBB_ROOT_PATH . 'language/' . $user_row['user_lang'] . '/mcp.' . PHP_EXT)) ? $user_row['user_lang'] : $config['default_lang'];
+ $user_row['user_lang'] = (file_exists(PHPBB_ROOT_PATH . 'language/' . $user_row['user_lang'] . '/mcp.' . PHP_EXT)) ? $user_row['user_lang'] : phpbb::$config['default_lang'];
include(PHPBB_ROOT_PATH . 'language/' . basename($user_row['user_lang']) . '/mcp.' . PHP_EXT);
$message_parser = new parse_message();
diff --git a/phpBB/modules/ucp/ucp_activate.php b/phpBB/modules/ucp/ucp_activate.php
index bc4618f5fd..7fd265ecf4 100644
--- a/phpBB/modules/ucp/ucp_activate.php
+++ b/phpBB/modules/ucp/ucp_activate.php
@@ -27,7 +27,7 @@ class ucp_activate
function main($id, $mode)
{
- global $db, $user, $auth, $template, $config;
+ global $db, $user, $auth, $template;
$user_id = request_var('u', 0);
$key = request_var('k', '');
@@ -85,7 +85,7 @@ class ucp_activate
$db->sql_query($sql);
}
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
{
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
@@ -95,7 +95,7 @@ class ucp_activate
$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);
diff --git a/phpBB/modules/ucp/ucp_attachments.php b/phpBB/modules/ucp/ucp_attachments.php
index 5bd66028a2..0ccc6afba8 100644
--- a/phpBB/modules/ucp/ucp_attachments.php
+++ b/phpBB/modules/ucp/ucp_attachments.php
@@ -27,7 +27,7 @@ class ucp_attachments
function main($id, $mode)
{
- global $template, $user, $db, $config;
+ global $template, $user, $db;
$start = request_var('start', 0);
$sort_key = request_var('sk', 'a');
@@ -127,7 +127,7 @@ class ucp_attachments
WHERE a.poster_id = ' . $user->data['user_id'] . "
AND a.is_orphan = 0
ORDER BY $order_by";
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start);
$row_count = 0;
if ($row = $db->sql_fetchrow($result))
@@ -172,8 +172,8 @@ class ucp_attachments
$db->sql_freeresult($result);
$template->assign_vars(array(
- 'PAGE_NUMBER' => on_page($num_attachments, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($num_attachments, phpbb::$config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;sk=$sort_key&amp;sd=$sort_dir", $num_attachments, phpbb::$config['topics_per_page'], $start),
'TOTAL_ATTACHMENTS' => $num_attachments,
'L_TITLE' => $user->lang['UCP_ATTACHMENTS'],
diff --git a/phpBB/modules/ucp/ucp_confirm.php b/phpBB/modules/ucp/ucp_confirm.php
index 26ffc3c5fb..d8e4a06b60 100644
--- a/phpBB/modules/ucp/ucp_confirm.php
+++ b/phpBB/modules/ucp/ucp_confirm.php
@@ -35,9 +35,9 @@ class ucp_confirm
function main($id, $mode)
{
- global $db, $user, $config;
+ global $db, $user;
include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT);
- $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = phpbb_captcha_factory::get_instance(phpbb::$config['captcha_plugin']);
$captcha->init(request_var('type', 0));
$captcha->execute();
garbage_collection();
diff --git a/phpBB/modules/ucp/ucp_groups.php b/phpBB/modules/ucp/ucp_groups.php
index f8c676df5f..e081583358 100644
--- a/phpBB/modules/ucp/ucp_groups.php
+++ b/phpBB/modules/ucp/ucp_groups.php
@@ -26,7 +26,7 @@ class ucp_groups
function main($id, $mode)
{
- global $db, $user, $auth, $template, $config;
+ global $db, $user, $auth, $template;
$user->add_lang('groups');
@@ -485,7 +485,7 @@ class ucp_groups
$avatar_select = basename(request_var('avatar_select', ''));
$category = basename(request_var('category', ''));
- $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;
// Did we submit?
if ($update)
@@ -536,14 +536,14 @@ class ucp_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;
}
}
@@ -555,21 +555,21 @@ class ucp_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']);
}
}
}
@@ -670,12 +670,12 @@ class ucp_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);
}
- $avatars_enabled = ($can_upload || ($config['allow_avatar_local'] || $config['allow_avatar_remote'])) ? true : false;
+ $avatars_enabled = ($can_upload || (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote'])) ? true : false;
$template->assign_vars(array(
'S_EDIT' => true,
@@ -685,8 +685,8 @@ class ucp_groups
'S_ERROR' => (sizeof($error)) ? true : false,
'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
'S_AVATARS_ENABLED' => $avatars_enabled,
- '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,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '',
@@ -699,7 +699,7 @@ class ucp_groups
'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
'S_RANK_OPTIONS' => $rank_options,
- 'AVATAR_MAX_FILESIZE' => $config['avatar_filesize'],
+ 'AVATAR_MAX_FILESIZE' => phpbb::$config['avatar_filesize'],
'GROUP_TYPE_FREE' => GROUP_FREE,
'GROUP_TYPE_OPEN' => GROUP_OPEN,
@@ -714,7 +714,7 @@ class ucp_groups
'U_SWATCH' => append_sid(CONFIG_ADM_FOLDER . '/swatch', 'form=ucp&amp;name=group_colour'),
'S_UCP_ACTION' => $this->u_action . "&amp;action=$action&amp;g=$group_id",
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], phpbb::$config['avatar_filesize'] / 1024),
));
break;
@@ -780,7 +780,7 @@ class ucp_groups
AND u.user_id = ug.user_id
AND ug.group_leader = 0
ORDER BY ug.user_pending DESC, 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;
$approved = false;
@@ -830,8 +830,8 @@ class ucp_groups
$template->assign_vars(array(
'S_LIST' => true,
'S_ACTION_OPTIONS' => $s_action_options,
- 'S_ON_PAGE' => on_page($total_members, $config['topics_per_page'], $start),
- 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, $config['topics_per_page'], $start),
+ 'S_ON_PAGE' => on_page($total_members, phpbb::$config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action . "&amp;action=$action&amp;g=$group_id", $total_members, phpbb::$config['topics_per_page'], $start),
'U_ACTION' => $this->u_action . "&amp;g=$group_id",
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&amp;form=ucp&amp;field=usernames'),
diff --git a/phpBB/modules/ucp/ucp_main.php b/phpBB/modules/ucp/ucp_main.php
index 2b239e8205..24fc74d8cb 100644
--- a/phpBB/modules/ucp/ucp_main.php
+++ b/phpBB/modules/ucp/ucp_main.php
@@ -33,7 +33,7 @@ class ucp_main
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $db, $user, $auth, $template;
switch ($mode)
{
@@ -44,14 +44,14 @@ class ucp_main
$sql_from = TOPICS_TABLE . ' t ';
$sql_select = '';
- if ($config['load_db_track'])
+ if (phpbb::$config['load_db_track'])
{
$sql_from .= ' LEFT JOIN ' . TOPICS_POSTED_TABLE . ' tp ON (tp.topic_id = t.topic_id
AND tp.user_id = ' . $user->data['user_id'] . ')';
$sql_select .= ', tp.topic_posted';
}
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$sql_from .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id
AND tt.user_id = ' . $user->data['user_id'] . ')';
@@ -100,7 +100,7 @@ class ucp_main
}
$topic_tracking_info = array();
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, false, $topic_list);
}
@@ -163,7 +163,7 @@ class ucp_main
);
}
- if ($config['load_user_activity'])
+ if (phpbb::$config['load_user_activity'])
{
if (!function_exists('display_user_activity'))
{
@@ -175,7 +175,7 @@ class ucp_main
// Do the relevant calculations
$memberdays = max(1, round((time() - $user->data['user_regdate']) / 86400));
$posts_per_day = $user->data['user_posts'] / $memberdays;
- $percentage = ($config['num_posts']) ? min(100, ($user->data['user_posts'] / $config['num_posts']) * 100) : 0;
+ $percentage = (phpbb::$config['num_posts']) ? min(100, ($user->data['user_posts'] / phpbb::$config['num_posts']) * 100) : 0;
$template->assign_vars(array(
'USER_COLOR' => (!empty($user->data['user_colour'])) ? $user->data['user_colour'] : '',
@@ -254,7 +254,7 @@ class ucp_main
$forbidden_forums = array();
- if ($config['allow_forum_notify'])
+ if (phpbb::$config['allow_forum_notify'])
{
$forbidden_forums = $auth->acl_getf('!f_read', true);
$forbidden_forums = array_unique(array_keys($forbidden_forums));
@@ -274,7 +274,7 @@ class ucp_main
'ORDER_BY' => 'left_id'
);
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$sql_array['LEFT_JOIN'] = array(
array(
@@ -287,7 +287,7 @@ class ucp_main
}
else
{
- $tracking_topics = phpbb_request::variable($config['cookie_name'] . '_track', '', false, phpbb_request::COOKIE);
+ $tracking_topics = phpbb_request::variable(phpbb::$config['cookie_name'] . '_track', '', false, phpbb_request::COOKIE);
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
@@ -298,13 +298,13 @@ class ucp_main
{
$forum_id = $row['forum_id'];
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
}
else
{
- $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + phpbb::$config['board_startdate']) : $user->data['user_lastmark'];
}
$unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false;
@@ -356,7 +356,7 @@ class ucp_main
}
// Subscribed Topics
- if ($config['allow_topic_notify'])
+ if (phpbb::$config['allow_topic_notify'])
{
if (empty($forbidden_forums))
{
@@ -367,15 +367,15 @@ class ucp_main
}
$template->assign_vars(array(
- 'S_TOPIC_NOTIFY' => $config['allow_topic_notify'],
- 'S_FORUM_NOTIFY' => $config['allow_forum_notify'],
+ 'S_TOPIC_NOTIFY' => phpbb::$config['allow_topic_notify'],
+ 'S_FORUM_NOTIFY' => phpbb::$config['allow_forum_notify'],
));
break;
case 'bookmarks':
- if (!$config['allow_bookmarks'])
+ if (!phpbb::$config['allow_bookmarks'])
{
$template->assign_vars(array(
'S_NO_DISPLAY_BOOKMARKS' => true)
@@ -633,7 +633,7 @@ class ucp_main
*/
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
{
- global $user, $db, $template, $config, $auth;
+ global $user, $db, $template, $auth;
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
$start = request_var('start', 0);
@@ -658,8 +658,8 @@ class ucp_main
if ($topics_count)
{
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination($this->u_action, $topics_count, phpbb::$config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($topics_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
);
}
@@ -705,21 +705,21 @@ class ucp_main
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TABLE => 'f'), 'ON' => 't.forum_id = f.forum_id');
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
$sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time';
}
- if ($config['load_db_track'])
+ if (phpbb::$config['load_db_track'])
{
$sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']);
$sql_array['SELECT'] .= ', tp.topic_posted';
}
$sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ $result = $db->sql_query_limit($sql, phpbb::$config['topics_per_page'], $start);
$topic_list = $topic_forum_list = $global_announce_list = $rowset = array();
while ($row = $db->sql_fetchrow($result))
@@ -729,7 +729,7 @@ class ucp_main
$topic_list[] = $topic_id;
$rowset[$topic_id] = $row;
- $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = (phpbb::$config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
$topic_forum_list[$row['forum_id']]['topics'][] = $topic_id;
if ($row['topic_type'] == POST_GLOBAL)
@@ -740,7 +740,7 @@ class ucp_main
$db->sql_freeresult($result);
$topic_tracking_info = array();
- if ($config['load_db_lastread'])
+ if (phpbb::$config['load_db_lastread'])
{
foreach ($topic_forum_list as $f_id => $topic_row)
{
diff --git a/phpBB/modules/ucp/ucp_pm.php b/phpBB/modules/ucp/ucp_pm.php
index 15e73bda27..76992be0df 100644
--- a/phpBB/modules/ucp/ucp_pm.php
+++ b/phpBB/modules/ucp/ucp_pm.php
@@ -43,7 +43,7 @@ class ucp_pm
function main($id, $mode)
{
- global $user, $template, $auth, $db, $config;
+ global $user, $template, $auth, $db;
if (!$user->data['is_registered'])
{
@@ -51,7 +51,7 @@ class ucp_pm
}
// Is PM disabled?
- if (!$config['allow_privmsg'])
+ if (!phpbb::$config['allow_privmsg'])
{
trigger_error('PM_DISABLED');
}
diff --git a/phpBB/modules/ucp/ucp_pm_compose.php b/phpBB/modules/ucp/ucp_pm_compose.php
index d81f5287eb..cebb3a11dc 100644
--- a/phpBB/modules/ucp/ucp_pm_compose.php
+++ b/phpBB/modules/ucp/ucp_pm_compose.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*/
function compose_pm($id, $mode, $action)
{
- global $template, $db, $auth, $user, $config;
+ global $template, $db, $auth, $user;
// Damn php and globals - i know, this is horrible
// Needed for handle_message_list_actions()
@@ -62,7 +62,7 @@ function compose_pm($id, $mode, $action)
|| $remove_u || $remove_g || $add_to || $add_bcc;
$action = ($delete && !$preview && !$refresh && $submit) ? 'delete' : $action;
- $select_single = ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
+ $select_single = (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
$error = array();
$current_time = time();
@@ -81,7 +81,7 @@ function compose_pm($id, $mode, $action)
if ($action != 'edit')
{
// Add groups to PM box
- if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group'))
+ if (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm_group'))
{
$sql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g';
@@ -113,8 +113,8 @@ function compose_pm($id, $mode, $action)
$template->assign_vars(array(
'S_SHOW_PM_BOX' => true,
- 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
- 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
+ 'S_ALLOW_MASS_PM' => (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
+ 'S_GROUP_OPTIONS' => (phpbb::$config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
'U_FIND_USERNAME' => append_sid('memberlist', "mode=searchuser&amp;form=postform&amp;field=username_list&amp;select_single=$select_single"),
));
}
@@ -206,7 +206,7 @@ function compose_pm($id, $mode, $action)
break;
}
- if ($action == 'forward' && (!$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
+ if ($action == 'forward' && (!phpbb::$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
{
trigger_error('NO_AUTH_FORWARD_MESSAGE');
}
@@ -353,14 +353,14 @@ function compose_pm($id, $mode, $action)
$check_value = 0;
}
- if (($to_group_id || isset($address_list['g'])) && (!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')))
+ if (($to_group_id || isset($address_list['g'])) && (!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')))
{
trigger_error('NO_AUTH_GROUP_MESSAGE');
}
if ($action == 'edit' && !$refresh && !$preview && !$submit)
{
- if (!($message_time > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']))
+ if (!($message_time > time() - (phpbb::$config['pm_edit_time'] * 60) || !phpbb::$config['pm_edit_time']))
{
trigger_error('CANNOT_EDIT_MESSAGE_TIME');
}
@@ -428,7 +428,7 @@ function compose_pm($id, $mode, $action)
$max_recipients = (int) $db->sql_fetchfield('max_recipients');
$db->sql_freeresult($result);
- $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients;
+ $max_recipients = (!$max_recipients) ? phpbb::$config['pm_max_recipients'] : $max_recipients;
// If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients
if (($action == 'reply' || $action == 'quote') && $max_recipients)
@@ -454,14 +454,14 @@ function compose_pm($id, $mode, $action)
handle_message_list_actions($address_list, $error, $remove_u, $remove_g, $add_to, $add_bcc);
// Check mass pm to group permission
- if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')) && !empty($address_list['g']))
+ if ((!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')) && !empty($address_list['g']))
{
$address_list = array();
$error[] = $user->lang['NO_AUTH_GROUP_MESSAGE'];
}
// Check mass pm to users permission
- if ((!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1)
+ if ((!phpbb::$config['allow_mass_pm'] || !$auth->acl_get('u_masspm')) && num_recipients($address_list) > 1)
{
$address_list = get_recipients($address_list, 1);
$error[] = $user->lang('TOO_MANY_RECIPIENTS', 1);
@@ -494,9 +494,9 @@ function compose_pm($id, $mode, $action)
if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
{
- $enable_sig = ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
- $enable_smilies = ($config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smilies'));
- $enable_bbcode = ($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && $user->optionget('bbcode'));
+ $enable_sig = (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
+ $enable_smilies = (phpbb::$config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smilies'));
+ $enable_bbcode = (phpbb::$config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode') && $user->optionget('bbcode'));
$enable_urls = true;
}
@@ -526,11 +526,11 @@ function compose_pm($id, $mode, $action)
$message_parser->bbcode_uid = $bbcode_uid;
}
- $bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
- $smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
- $img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
- $flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
- $url_status = ($config['allow_post_links']) ? true : false;
+ $bbcode_status = (phpbb::$config['allow_bbcode'] && phpbb::$config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
+ $smilies_status = (phpbb::$config['allow_smilies'] && phpbb::$config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
+ $img_status = (phpbb::$config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
+ $flash_status = (phpbb::$config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
+ $url_status = (phpbb::$config['allow_post_links']) ? true : false;
// Save Draft
if ($save && $auth->acl_get('u_savedrafts'))
@@ -640,7 +640,7 @@ function compose_pm($id, $mode, $action)
$enable_bbcode = (!$bbcode_status || phpbb_request::is_set_post('disable_bbcode')) ? false : true;
$enable_smilies = (!$smilies_status || phpbb_request::is_set_post'disable_smilies')) ? false : true;
$enable_urls = (phpbb_request::is_set_post('disable_magic_url')) ? 0 : 1;
- $enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : phpbb_request::is_set_post('attach_sig');
+ $enable_sig = (!phpbb::$config['allow_sig'] ||!phpbb::$config['allow_sig_pm']) ? false : phpbb_request::is_set_post('attach_sig');
if ($submit)
{
@@ -662,7 +662,7 @@ function compose_pm($id, $mode, $action)
}
// Parse message
- $message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_post_links']);
+ $message_parser->parse($enable_bbcode, (phpbb::$config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, phpbb::$config['allow_post_links']);
// On a refresh we do not care about message parsing errors
if (sizeof($message_parser->warn_msg) && !$refresh)
@@ -670,14 +670,14 @@ function compose_pm($id, $mode, $action)
$error[] = implode('<br />', $message_parser->warn_msg);
}
- if ($action != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('u_ignoreflood'))
+ if ($action != 'edit' && !$preview && !$refresh && phpbb::$config['flood_interval'] && !$auth->acl_get('u_ignoreflood'))
{
// Flood check
$last_post_time = $user->data['user_lastpost_time'];
if ($last_post_time)
{
- if ($last_post_time && ($current_time - $last_post_time) < intval($config['flood_interval']))
+ if ($last_post_time && ($current_time - $last_post_time) < intval(phpbb::$config['flood_interval']))
{
$error[] = $user->lang['FLOOD_ERROR'];
}
@@ -746,7 +746,7 @@ function compose_pm($id, $mode, $action)
$preview_signature_bitfield = $user->data['user_sig_bbcode_bitfield'];
// Signature
- if ($enable_sig && $config['allow_sig'] && $preview_signature)
+ if ($enable_sig && phpbb::$config['allow_sig'] && $preview_signature)
{
$parse_sig = new parse_message($preview_signature);
$parse_sig->bbcode_uid = $preview_signature_uid;
@@ -805,7 +805,7 @@ function compose_pm($id, $mode, $action)
if ($action == 'quotepost')
{
$post_id = request_var('p', 0);
- if ($config['allow_post_links'])
+ if (phpbb::$config['allow_post_links'])
{
$message_link = "[url=" . generate_board_url() . '/viewtopic.' . PHP_EXT . "?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
}
@@ -830,7 +830,7 @@ function compose_pm($id, $mode, $action)
{
$fwd_to_field = write_pm_addresses(array('to' => $post['to_address']), 0, true);
- if ($config['allow_post_links'])
+ if (phpbb::$config['allow_post_links'])
{
$quote_username_text = '[url=' . generate_board_url() . '/memberlist.' . PHP_EXT . "?mode=viewprofile&amp;u={$post['author_id']}]{$quote_username}[/url]";
}
@@ -861,7 +861,7 @@ function compose_pm($id, $mode, $action)
// Generate PM Icons
$s_pm_icons = false;
- if ($config['enable_pm_icons'])
+ if (phpbb::$config['enable_pm_icons'])
{
$s_pm_icons = posting_gen_topic_icons($action, $icon_id);
}
@@ -976,8 +976,8 @@ function compose_pm($id, $mode, $action)
$s_hidden_address_field = build_address_field($address_list);
- $bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : (($config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
- $smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : (($config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
+ $bbcode_checked = (isset($enable_bbcode)) ? !$enable_bbcode : ((phpbb::$config['allow_bbcode'] && $auth->acl_get('u_pm_bbcode')) ? !$user->optionget('bbcode') : 1);
+ $smilies_checked = (isset($enable_smilies)) ? !$enable_smilies : ((phpbb::$config['allow_smilies'] && $auth->acl_get('u_pm_smilies')) ? !$user->optionget('smilies') : 1);
$urls_checked = (isset($enable_urls)) ? !$enable_urls : 0;
$sig_checked = $enable_sig;
@@ -1016,13 +1016,13 @@ function compose_pm($id, $mode, $action)
$s_hidden_fields .= (isset($check_value)) ? '<input type="hidden" name="status_switch" value="' . $check_value . '" />' : '';
$s_hidden_fields .= ($draft_id || phpbb_request::is_set('draft_loaded')) ? '<input type="hidden" name="draft_loaded" value="' . request_var('draft_loaded', (int) $draft_id) . '" />' : '';
- $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
+ $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
// Start assigning vars for main posting page ...
$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => $user->lang['PM_ICON'],
- 'L_MESSAGE_BODY_EXPLAIN' => (intval($config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval($config['max_post_chars'])) : '',
+ 'L_MESSAGE_BODY_EXPLAIN' => (intval(phpbb::$config['max_post_chars'])) ? sprintf($user->lang['MESSAGE_BODY_EXPLAIN'], intval(phpbb::$config['max_post_chars'])) : '',
'SUBJECT' => (isset($message_subject)) ? $message_subject : '',
'MESSAGE' => $message_text,
@@ -1033,7 +1033,7 @@ function compose_pm($id, $mode, $action)
'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['PM']),
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
- 'MAX_RECIPIENTS' => ($config['allow_mass_pm'] && ($auth->acl_get('u_masspm') || $auth->acl_get('u_masspm_group'))) ? $max_recipients : 0,
+ 'MAX_RECIPIENTS' => (phpbb::$config['allow_mass_pm'] && ($auth->acl_get('u_masspm') || $auth->acl_get('u_masspm_group'))) ? $max_recipients : 0,
'S_COMPOSE_PM' => true,
'S_EDIT_POST' => ($action == 'edit'),
@@ -1042,7 +1042,7 @@ function compose_pm($id, $mode, $action)
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
'S_SMILIES_ALLOWED' => $smilies_status,
'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '',
- 'S_SIG_ALLOWED' => ($config['allow_sig'] && $config['allow_sig_pm'] && $auth->acl_get('u_sig')),
+ 'S_SIG_ALLOWED' => (phpbb::$config['allow_sig'] && phpbb::$config['allow_sig_pm'] && $auth->acl_get('u_sig')),
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
'S_LINKS_ALLOWED' => $url_status,
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
@@ -1068,7 +1068,7 @@ function compose_pm($id, $mode, $action)
display_custom_bbcodes();
// Show attachment box for adding attachments if true
- $allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype);
+ $allowed = ($auth->acl_get('u_pm_attach') && phpbb::$config['allow_pm_attach'] && $form_enctype);
// Attachment entry
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
diff --git a/phpBB/modules/ucp/ucp_pm_options.php b/phpBB/modules/ucp/ucp_pm_options.php
index 4b25056d82..43e1c8713a 100644
--- a/phpBB/modules/ucp/ucp_pm_options.php
+++ b/phpBB/modules/ucp/ucp_pm_options.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions)
{
- global $user, $template, $auth, $config, $db;
+ global $user, $template, $auth, $db;
$redirect_url = append_sid('ucp', "i=pm&amp;mode=options");
@@ -29,7 +29,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
// Change "full folder" setting - what to do if folder is full
if (phpbb_request::is_set_post('fullfolder'))
{
- check_form_key('ucp_pm_options', $config['form_token_lifetime'], $redirect_url);
+ check_form_key('ucp_pm_options', phpbb::$config['form_token_lifetime'], $redirect_url);
$full_action = request_var('full_action', 0);
$set_folder_id = 0;
@@ -97,7 +97,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
$num_folder = (int) $db->sql_fetchfield('num_folder');
$db->sql_freeresult($result);
- if ($num_folder >= $config['pm_max_boxes'])
+ if ($num_folder >= phpbb::$config['pm_max_boxes'])
{
trigger_error('MAX_FOLDER_REACHED');
}
@@ -429,7 +429,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
if ($user->data['user_full_folder'] == FULL_FOLDER_NONE)
{
// -3 here to let the correct folder id be selected
- $to_folder_id = $config['full_folder_action'] - 3;
+ $to_folder_id = phpbb::$config['full_folder_action'] - 3;
}
else
{
@@ -453,7 +453,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
if ($user->data['user_full_folder'] == FULL_FOLDER_NONE)
{
- switch ($config['full_folder_action'])
+ switch (phpbb::$config['full_folder_action'])
{
case 1:
$s_delete_checked = ' checked="checked"';
@@ -472,10 +472,10 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
'S_DELETE_CHECKED' => $s_delete_checked,
'S_HOLD_CHECKED' => $s_hold_checked,
'S_MOVE_CHECKED' => $s_move_checked,
- 'S_MAX_FOLDER_REACHED' => ($num_user_folder >= $config['pm_max_boxes']) ? true : false,
- 'S_MAX_FOLDER_ZERO' => ($config['pm_max_boxes'] == 0) ? true : false,
+ 'S_MAX_FOLDER_REACHED' => ($num_user_folder >= phpbb::$config['pm_max_boxes']) ? true : false,
+ 'S_MAX_FOLDER_ZERO' => (phpbb::$config['pm_max_boxes'] == 0) ? true : false,
- 'DEFAULT_ACTION' => ($config['full_folder_action'] == 1) ? $user->lang['DELETE_OLDEST_MESSAGES'] : $user->lang['HOLD_NEW_MESSAGES'],
+ 'DEFAULT_ACTION' => (phpbb::$config['full_folder_action'] == 1) ? $user->lang['DELETE_OLDEST_MESSAGES'] : $user->lang['HOLD_NEW_MESSAGES'],
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&amp;form=ucp&amp;field=rule_string&amp;select_single=true'),
));
diff --git a/phpBB/modules/ucp/ucp_pm_viewfolder.php b/phpBB/modules/ucp/ucp_pm_viewfolder.php
index 7024c1d318..7c5c2480c2 100644
--- a/phpBB/modules/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/modules/ucp/ucp_pm_viewfolder.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*/
function view_folder($id, $mode, $folder_id, $folder)
{
- global $user, $template, $auth, $db, $config;
+ global $user, $template, $auth, $db;
$submit_export = phpbb_request::is_set_post('submit_export');
@@ -228,12 +228,12 @@ function view_folder($id, $mode, $folder_id, $folder)
'SUBJECT' => censor_text($row['message_subject']),
'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '',
'U_FOLDER' => (isset($folder[$row['folder_id']])) ? append_sid('ucp', 'folder=' . $row['folder_id']) : '',
- 'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
- 'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? $config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '',
+ 'PM_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? '<img src="' . phpbb::$config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] . '" width="' . $icons[$row['icon_id']]['width'] . '" height="' . $icons[$row['icon_id']]['height'] . '" alt="" title="" />' : '',
+ 'PM_ICON_URL' => (!empty($icons[$row['icon_id']])) ? phpbb::$config['icons_path'] . '/' . $icons[$row['icon_id']]['img'] : '',
'FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, 'src'),
'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '',
- 'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && phpbb::$config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'S_PM_DELETED' => ($row['pm_deleted']) ? true : false,
'S_AUTHOR_DELETED' => ($row['author_id'] == ANONYMOUS) ? true : false,
@@ -249,7 +249,7 @@ function view_folder($id, $mode, $folder_id, $folder)
'S_SHOW_RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? true : false,
'S_SHOW_COLOUR_LEGEND' => true,
- 'S_PM_ICONS' => ($config['enable_pm_icons']) ? true : false)
+ 'S_PM_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false)
);
}
}
@@ -438,7 +438,7 @@ function view_folder($id, $mode, $folder_id, $folder)
*/
function get_pm_from($folder_id, $folder, $user_id)
{
- global $user, $db, $template, $config, $auth;
+ global $user, $db, $template, $auth;
$start = request_var('start', 0);
@@ -497,8 +497,8 @@ function get_pm_from($folder_id, $folder, $user_id)
}
$template->assign_vars(array(
- 'PAGINATION' => generate_pagination(append_sid('ucp', "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param"), $pm_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($pm_count, $config['topics_per_page'], $start),
+ 'PAGINATION' => generate_pagination(append_sid('ucp', "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id&amp;$u_sort_param"), $pm_count, phpbb::$config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($pm_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)),
'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'PM_LOCKED') : $user->img('button_pm_new', 'POST_PM'),
@@ -508,7 +508,7 @@ function get_pm_from($folder_id, $folder, $user_id)
'S_SELECT_SORT_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days,
- 'S_TOPIC_ICONS' => ($config['enable_pm_icons']) ? true : false,
+ 'S_TOPIC_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false,
'U_POST_NEW_TOPIC' => ($auth->acl_get('u_sendpm')) ? append_sid('ucp', 'i=pm&amp;mode=compose') : '',
'S_PM_ACTION' => append_sid('ucp', "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id" . (($start !== 0) ? "&amp;start=$start" : '')))
@@ -519,14 +519,14 @@ function get_pm_from($folder_id, $folder, $user_id)
// If the user is trying to reach late pages, start searching from the end
$store_reverse = false;
- $sql_limit = $config['topics_per_page'];
+ $sql_limit = phpbb::$config['topics_per_page'];
if ($start > $pm_count / 2)
{
$store_reverse = true;
- if ($start + $config['topics_per_page'] > $pm_count)
+ if ($start + phpbb::$config['topics_per_page'] > $pm_count)
{
- $sql_limit = min($config['topics_per_page'], max(1, $pm_count - $start));
+ $sql_limit = min(phpbb::$config['topics_per_page'], max(1, $pm_count - $start));
}
// Select the sort order
diff --git a/phpBB/modules/ucp/ucp_pm_viewmessage.php b/phpBB/modules/ucp/ucp_pm_viewmessage.php
index cd183a1085..793e9078a2 100644
--- a/phpBB/modules/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/modules/ucp/ucp_pm_viewmessage.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*/
function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
{
- global $user, $template, $auth, $db, $config;
+ global $user, $template, $auth, $db;
$user->add_lang(array('viewtopic', 'memberlist'));
@@ -79,7 +79,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$message_row['message_subject'] = censor_text($message_row['message_subject']);
// Editing information
- if ($message_row['message_edit_count'] && $config['display_last_edited'])
+ if ($message_row['message_edit_count'] && phpbb::$config['display_last_edited'])
{
$l_edit_time_total = ($message_row['message_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, (!$message_row['message_edit_user']) ? $message_row['username'] : $message_row['message_edit_user'], $user->format_date($message_row['message_edit_time'], false, true), $message_row['message_edit_count']);
@@ -93,7 +93,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$display_notice = false;
$attachments = array();
- if ($message_row['message_attachment'] && $config['allow_pm_attach'])
+ if ($message_row['message_attachment'] && phpbb::$config['allow_pm_attach'])
{
if ($auth->acl_get('u_pm_download'))
{
@@ -143,7 +143,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$user_info['sig'] = '';
- $signature = ($message_row['enable_sig'] && $config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
+ $signature = ($message_row['enable_sig'] && phpbb::$config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('viewsigs')) ? $user_info['user_sig'] : '';
// End signature parsing, only if needed
if ($signature)
@@ -180,8 +180,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'AUTHOR_POSTS' => (!empty($user_info['user_posts'])) ? $user_info['user_posts'] : '',
'AUTHOR_FROM' => (!empty($user_info['user_from'])) ? $user_info['user_from'] : '',
- 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),
- 'S_ONLINE' => (!$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false),
+ 'ONLINE_IMG' => (!phpbb::$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),
+ 'S_ONLINE' => (!phpbb::$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false),
'DELETE_IMG' => $user->img('icon_post_delete', $user->lang['DELETE_MESSAGE']),
'INFO_IMG' => $user->img('icon_post_info', $user->lang['VIEW_PM_INFO']),
'PROFILE_IMG' => $user->img('icon_user_profile', $user->lang['READ_PROFILE']),
@@ -198,7 +198,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'EDITED_MESSAGE' => $l_edited_by,
'MESSAGE_ID' => $message_row['msg_id'],
- 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;u=' . $author_id) : '',
+ 'U_PM' => (phpbb::$config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;u=' . $author_id) : '',
'U_WWW' => (!empty($user_info['user_website'])) ? $user_info['user_website'] : '',
'U_ICQ' => ($user_info['user_icq']) ? 'http://www.icq.com/people/webmsg.php?to=' . urlencode($user_info['user_icq']) : '',
'U_AIM' => ($user_info['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', 'mode=contact&amp;action=aim&amp;u=' . $author_id) : '',
@@ -209,7 +209,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&amp;mode=compose&amp;action=delete&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=quote&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
- 'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
+ 'U_EDIT' => (($message_row['message_time'] > time() - (phpbb::$config['pm_edit_time'] * 60) || !phpbb::$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&amp;mode=compose&amp;action=edit&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '',
'U_PREVIOUS_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=previous",
'U_NEXT_PM' => "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=next",
@@ -219,8 +219,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
- 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
- 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
+ 'U_PRINT_PM' => (phpbb::$config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
+ 'U_FORWARD_PM' => (phpbb::$config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
);
// Display not already displayed Attachments for this post, we already parsed them. ;)
@@ -249,7 +249,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
*/
function get_user_information($user_id, $user_row)
{
- global $db, $auth, $user, $config;
+ global $db, $auth, $user;
if (!$user_id)
{
@@ -271,7 +271,7 @@ function get_user_information($user_id, $user_row)
$user_row['rank_title'] = $user_row['rank_image'] = $user_row['rank_image_src'] = $user_row['email'] = '';
// Generate online information for user
- if ($config['load_onlinetrack'])
+ if (phpbb::$config['load_onlinetrack'])
{
$sql = 'SELECT session_user_id, MAX(session_time) as online_time, MIN(session_viewonline) AS viewonline
FROM ' . SESSIONS_TABLE . "
@@ -281,7 +281,7 @@ function get_user_information($user_id, $user_row)
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $update_time = $config['load_online_time'] * 60;
+ $update_time = phpbb::$config['load_online_time'] * 60;
if ($row)
{
$user_row['online'] = (time() - $update_time < $row['online_time'] && ($row['viewonline'])) ? true : false;
@@ -299,7 +299,7 @@ function get_user_information($user_id, $user_row)
if (!empty($user_row['user_allow_viewemail']) || $auth->acl_get('a_email'))
{
- $user_row['email'] = ($config['board_email_form'] && $config['email_enable']) ? append_sid('memberlist', "mode=email&amp;u=$user_id") : ((($config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
+ $user_row['email'] = (phpbb::$config['board_email_form'] && phpbb::$config['email_enable']) ? append_sid('memberlist', "mode=email&amp;u=$user_id") : (((phpbb::$config['board_hide_emails'] && !$auth->acl_get('a_email')) || empty($user_row['user_email'])) ? '' : 'mailto:' . $user_row['user_email']);
}
return $user_row;
diff --git a/phpBB/modules/ucp/ucp_prefs.php b/phpBB/modules/ucp/ucp_prefs.php
index 4e78d480ab..3c4cb354d7 100644
--- a/phpBB/modules/ucp/ucp_prefs.php
+++ b/phpBB/modules/ucp/ucp_prefs.php
@@ -27,7 +27,7 @@ class ucp_prefs
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $db, $user, $auth, $template;
$submit = phpbb_request::is_set_post('submit');
$error = $data = array();
@@ -53,7 +53,7 @@ class ucp_prefs
'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']),
);
- if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
+ if ($data['notifymethod'] == NOTIFY_IM && (!phpbb::$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml')))
{
// Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct.
$data['notifymethod'] = NOTIFY_BOTH;
@@ -61,7 +61,7 @@ class ucp_prefs
if ($submit)
{
- $data['style'] = ($config['override_user_style']) ? $config['default_style'] : $data['style'];
+ $data['style'] = (phpbb::$config['override_user_style']) ? phpbb::$config['default_style'] : $data['style'];
$error = validate_data($data, array(
'dateformat' => array('string', false, 1, 30),
@@ -145,14 +145,14 @@ class ucp_prefs
'A_DATE_FORMAT' => addslashes($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' => ($config['override_user_style']) ? '' : style_select($data['style']),
+ 'S_STYLE_OPTIONS' => (phpbb::$config['override_user_style']) ? '' : style_select($data['style']),
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
- 'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
+ 'S_SELECT_NOTIFY' => (phpbb::$config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);
break;
diff --git a/phpBB/modules/ucp/ucp_profile.php b/phpBB/modules/ucp/ucp_profile.php
index cdae16b6f4..c23981b0d4 100644
--- a/phpBB/modules/ucp/ucp_profile.php
+++ b/phpBB/modules/ucp/ucp_profile.php
@@ -29,7 +29,7 @@ class ucp_profile
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $db, $user, $auth, $template;
$user->add_lang('posting');
@@ -59,19 +59,19 @@ class ucp_profile
// Do not check cur_password, it is the old one.
$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']),
'email' => array(
array('string', false, 6, 60),
array('email')),
'email_confirm' => array('string', true, 6, 60),
);
- if ($auth->acl_get('u_chgname') && $config['allow_namechange'])
+ if ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
{
$check_ary['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'),
);
}
@@ -83,7 +83,7 @@ class ucp_profile
$error[] = 'NEW_PASSWORD_ERROR';
}
- if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
+ if (($data['new_password'] || ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email']) || ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])) && !phpbb_check_hash($data['cur_password'], $user->data['user_password']))
{
$error[] = 'CUR_PASSWORD_ERROR';
}
@@ -107,15 +107,15 @@ class ucp_profile
if (!sizeof($error))
{
$sql_ary = array(
- 'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'],
- 'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'],
+ 'username' => ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? $data['username'] : $user->data['username'],
+ 'username_clean' => ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'],
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? hexdec(crc32($data['email']) . strlen($data['email'])) : $user->data['user_email_hash'],
'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? phpbb_hash($data['new_password']) : $user->data['user_password'],
'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
);
- if ($auth->acl_get('u_chgname') && $config['allow_namechange'] && $data['username'] != $user->data['username'])
+ if ($auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'] && $data['username'] != $user->data['username'])
{
add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_NAME', $user->data['username'], $data['username']);
}
@@ -133,9 +133,9 @@ class ucp_profile
$message = 'PROFILE_UPDATED';
- if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != phpbb::USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
+ if (phpbb::$config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != phpbb::USER_FOUNDER && (phpbb::$config['require_activation'] == USER_ACTIVATION_SELF || phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN))
{
- $message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN';
+ $message = (phpbb::$config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN';
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
@@ -148,12 +148,12 @@ class ucp_profile
$messenger = new messenger(false);
- $template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate';
+ $template_file = (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate';
$messenger->template($template_file, $user->data['user_lang']);
$messenger->to($data['email'], $data['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);
@@ -165,7 +165,7 @@ class ucp_profile
$messenger->send(NOTIFY_EMAIL);
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
{
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
@@ -217,7 +217,7 @@ class ucp_profile
}
// Need to update config, forum, topic, posting, messages, etc.
- if ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])
+ if ($data['username'] != $user->data['username'] && $auth->acl_get('u_chgname') && phpbb::$config['allow_namechange'])
{
user_update_name($user->data['username'], $data['username']);
}
@@ -253,11 +253,11 @@ class ucp_profile
'NEW_PASSWORD' => $data['new_password'],
'CUR_PASSWORD' => '',
- 'L_USERNAME_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_USERNAME_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']),
- 'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false,
- 'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
+ 'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && phpbb::$config['chg_passforce'] && $user->data['user_passchg'] < time() - (phpbb::$config['chg_passforce'] * 86400)) ? true : false,
+ 'S_CHANGE_USERNAME' => (phpbb::$config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false,
'S_CHANGE_EMAIL' => ($auth->acl_get('u_chgemail')) ? true : false,
'S_CHANGE_PASSWORD' => ($auth->acl_get('u_chgpasswd')) ? true : false)
);
@@ -283,7 +283,7 @@ class ucp_profile
'interests' => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),
);
- if ($config['allow_birthdays'])
+ if (phpbb::$config['allow_birthdays'])
{
$data['bday_day'] = $data['bday_month'] = $data['bday_year'] = 0;
@@ -320,7 +320,7 @@ class ucp_profile
'interests' => array('string', true, 2, 500),
);
- if ($config['allow_birthdays'])
+ if (phpbb::$config['allow_birthdays'])
{
$validate_array = array_merge($validate_array, array(
'bday_day' => array('num', true, 1, 31),
@@ -349,7 +349,7 @@ class ucp_profile
{
$data['notify'] = $user->data['user_notify_type'];
- if (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml'))
+ if (!phpbb::$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml'))
{
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
// Disable notify by Jabber now for this user.
@@ -369,7 +369,7 @@ class ucp_profile
'user_notify_type' => $data['notify'],
);
- if ($config['allow_birthdays'])
+ if (phpbb::$config['allow_birthdays'])
{
$sql_ary['user_birthday'] = $data['user_birthday'];
}
@@ -409,7 +409,7 @@ class ucp_profile
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
}
- if ($config['allow_birthdays'])
+ if (phpbb::$config['allow_birthdays'])
{
$s_birthday_day_options = '<option value="0"' . ((!$data['bday_day']) ? ' selected="selected"' : '') . '>--</option>';
for ($i = 1; $i < 32; $i++)
@@ -474,9 +474,9 @@ class ucp_profile
include(PHPBB_ROOT_PATH . 'includes/functions_posting.' . PHP_EXT);
include(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->data['user_sig'], true));
@@ -491,7 +491,7 @@ class ucp_profile
$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))
{
@@ -544,19 +544,19 @@ class ucp_profile
'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)
);
// Build custom bbcodes array
@@ -572,7 +572,7 @@ class ucp_profile
$avatar_select = basename(request_var('avatar_select', ''));
$category = basename(request_var('category', ''));
- $can_upload = ($config['allow_avatar_upload'] && file_exists(PHPBB_ROOT_PATH . $config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+ $can_upload = (phpbb::$config['allow_avatar_upload'] && file_exists(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && @is_writable(PHPBB_ROOT_PATH . phpbb::$config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
add_form_key('ucp_avatar');
@@ -598,22 +598,22 @@ class ucp_profile
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
- 'AVATAR_SIZE' => $config['avatar_filesize'],
+ 'AVATAR_SIZE' => phpbb::$config['avatar_filesize'],
'U_GALLERY' => append_sid('ucp', 'i=profile&amp;mode=avatar&amp;display_gallery=1'),
'S_FORM_ENCTYPE' => ($can_upload) ? ' enctype="multipart/form-data"' : '',
- 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
+ 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], phpbb::$config['avatar_filesize'] / 1024),
));
- if ($display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
+ if ($display_gallery && $auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local'])
{
avatar_gallery($category, $avatar_select, 4);
}
else
{
- $avatars_enabled = ($can_upload || ($auth->acl_get('u_chgavatar') && ($config['allow_avatar_local'] || $config['allow_avatar_remote']))) ? true : false;
+ $avatars_enabled = ($can_upload || ($auth->acl_get('u_chgavatar') && (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote']))) ? true : false;
$template->assign_vars(array(
'AVATAR_WIDTH' => request_var('width', $user->data['user_avatar_width']),
@@ -622,8 +622,8 @@ class ucp_profile
'S_AVATARS_ENABLED' => $avatars_enabled,
'S_UPLOAD_AVATAR_FILE' => $can_upload,
'S_UPLOAD_AVATAR_URL' => $can_upload,
- 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_remote']) ? true : false,
- 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && $config['allow_avatar_local']) ? true : false)
+ 'S_LINK_AVATAR' => ($auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_remote']) ? true : false,
+ 'S_DISPLAY_GALLERY' => ($auth->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local']) ? true : false)
);
}
diff --git a/phpBB/modules/ucp/ucp_register.php b/phpBB/modules/ucp/ucp_register.php
index 55f75bd9fb..68da529809 100644
--- a/phpBB/modules/ucp/ucp_register.php
+++ b/phpBB/modules/ucp/ucp_register.php
@@ -27,10 +27,10 @@ class ucp_register
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $db, $user, $auth, $template;
//
- if ($config['require_activation'] == USER_ACTIVATION_DISABLE)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_DISABLE)
{
trigger_error('UCP_REGISTER_DISABLE');
}
@@ -53,14 +53,14 @@ class ucp_register
}
- if ($config['enable_confirm'])
+ if (phpbb::$config['enable_confirm'])
{
include(PHPBB_ROOT_PATH . 'includes/captcha/captcha_factory.' . PHP_EXT);
- $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = phpbb_captcha_factory::get_instance(phpbb::$config['captcha_plugin']);
$captcha->init(CONFIRM_REG);
}
- if ($change_lang || $user_lang != $config['default_lang'])
+ if ($change_lang || $user_lang != phpbb::$config['default_lang'])
{
$use_lang = ($change_lang) ? basename($change_lang) : basename($user_lang);
@@ -90,7 +90,7 @@ class ucp_register
$error = $cp_data = $cp_error = array();
- if (!$agreed || ($coppa === false && $config['coppa_enable']) || ($coppa && !$config['coppa_enable']))
+ if (!$agreed || ($coppa === false && phpbb::$config['coppa_enable']) || ($coppa && !phpbb::$config['coppa_enable']))
{
$add_lang = ($change_lang) ? '&amp;change_lang=' . urlencode($change_lang) : '';
$add_coppa = ($coppa !== false) ? '&amp;coppa=' . $coppa : '';
@@ -106,16 +106,16 @@ class ucp_register
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'lang' => $user->lang_name,
- 'tz' => request_var('tz', (float) $config['board_timezone']),
+ 'tz' => request_var('tz', (float) phpbb::$config['board_timezone']),
));
- if ($config['enable_confirm'])
+ if (phpbb::$config['enable_confirm'])
{
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
}
}
- if ($coppa === false && $config['coppa_enable'])
+ if ($coppa === false && phpbb::$config['coppa_enable'])
{
$now = getdate();
$coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
@@ -136,7 +136,7 @@ class ucp_register
else
{
$template->assign_vars(array(
- 'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
+ 'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], phpbb::$config['sitename'], generate_board_url()),
'S_SHOW_COPPA' => false,
'S_REGISTRATION' => true,
@@ -155,19 +155,19 @@ class ucp_register
$timezone = date('Z') / 3600;
$is_dst = date('I');
- if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
+ if (phpbb::$config['board_timezone'] == $timezone || phpbb::$config['board_timezone'] == ($timezone - 1))
{
$timezone = ($is_dst) ? $timezone - 1 : $timezone;
if (!isset($user->lang['tz_zones'][(string) $timezone]))
{
- $timezone = $config['board_timezone'];
+ $timezone = phpbb::$config['board_timezone'];
}
}
else
{
- $is_dst = $config['board_dst'];
- $timezone = $config['board_timezone'];
+ $is_dst = phpbb::$config['board_dst'];
+ $timezone = phpbb::$config['board_timezone'];
}
$data = array(
@@ -185,12 +185,12 @@ class ucp_register
{
$error = validate_data($data, 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', '')),
'new_password' => array(
- array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ array('string', false, phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']),
array('password')),
- 'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
+ 'password_confirm' => array('string', false, phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
array('email')),
@@ -205,7 +205,7 @@ class ucp_register
// Replace "error" strings with their real, localised form
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
- if ($config['enable_confirm'])
+ if (phpbb::$config['enable_confirm'])
{
$vc_response = $captcha->validate();
if ($vc_response)
@@ -216,13 +216,13 @@ class ucp_register
{
$captcha->reset();
}
- if ($config['max_reg_attempts'] && $captcha->get_attempt_count() > $config['max_reg_attempts'])
+ if (phpbb::$config['max_reg_attempts'] && $captcha->get_attempt_count() > phpbb::$config['max_reg_attempts'])
{
$error[] = $user->lang['TOO_MANY_REGISTERS'];
}
}
// DNSBL check
- if ($config['check_dnsbl'])
+ if (phpbb::$config['check_dnsbl'])
{
if (($dnsbl = $user->check_dnsbl('register')) !== false)
{
@@ -269,8 +269,8 @@ class ucp_register
$group_id = $row['group_id'];
if (($coppa ||
- $config['require_activation'] == USER_ACTIVATION_SELF ||
- $config['require_activation'] == USER_ACTIVATION_ADMIN) && $config['email_enable'])
+ phpbb::$config['require_activation'] == USER_ACTIVATION_SELF ||
+ phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN) && phpbb::$config['email_enable'])
{
$user_actkey = gen_rand_string(10);
$key_len = 54 - (strlen($server_url));
@@ -314,17 +314,17 @@ class ucp_register
trigger_error('NO_USER', E_USER_ERROR);
}
- if ($coppa && $config['email_enable'])
+ if ($coppa && phpbb::$config['email_enable'])
{
$message = $user->lang['ACCOUNT_COPPA'];
$email_template = 'coppa_welcome_inactive';
}
- else if ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable'])
+ else if (phpbb::$config['require_activation'] == USER_ACTIVATION_SELF && phpbb::$config['email_enable'])
{
$message = $user->lang['ACCOUNT_INACTIVE'];
$email_template = 'user_welcome_inactive';
}
- else if ($config['require_activation'] == USER_ACTIVATION_ADMIN && $config['email_enable'])
+ else if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN && phpbb::$config['email_enable'])
{
$message = $user->lang['ACCOUNT_INACTIVE_ADMIN'];
$email_template = 'admin_welcome_inactive';
@@ -335,7 +335,7 @@ class ucp_register
$email_template = 'user_welcome';
}
- if ($config['email_enable'])
+ if (phpbb::$config['email_enable'])
{
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
@@ -345,13 +345,13 @@ class ucp_register
$messenger->to($data['email'], $data['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($data['username']),
'PASSWORD' => htmlspecialchars_decode($data['new_password']),
'U_ACTIVATE' => "$server_url/ucp." . PHP_EXT . "?mode=activate&u=$user_id&k=$user_actkey")
@@ -360,15 +360,15 @@ class ucp_register
if ($coppa)
{
$messenger->assign_vars(array(
- 'FAX_INFO' => $config['coppa_fax'],
- 'MAIL_INFO' => $config['coppa_mail'],
- 'EMAIL_ADDRESS' => $data['email'])
- );
+ 'FAX_INFO' => phpbb::$config['coppa_fax'],
+ 'MAIL_INFO' => phpbb::$config['coppa_mail'],
+ 'EMAIL_ADDRESS' => $data['email'],
+ ));
}
$messenger->send(NOTIFY_EMAIL);
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
{
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
@@ -415,7 +415,7 @@ class ucp_register
'change_lang' => 0,
);
- if ($config['coppa_enable'])
+ if (phpbb::$config['coppa_enable'])
{
$s_hidden_fields['coppa'] = $coppa;
}
@@ -425,7 +425,7 @@ class ucp_register
// Visual Confirmation - Show images
- if ($config['enable_confirm'])
+ if (phpbb::$config['enable_confirm'])
{
if ($change_lang)
{
@@ -437,14 +437,14 @@ class ucp_register
}
$template->assign_vars(array(
- 'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>'),
+ 'L_CONFIRM_EXPLAIN' => sprintf($user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars(phpbb::$config['board_contact']) . '">', '</a>'),
'S_CAPTCHA' => $captcha->get_template(),
));
}
//
$l_reg_cond = '';
- switch ($config['require_activation'])
+ switch (phpbb::$config['require_activation'])
{
case USER_ACTIVATION_SELF:
$l_reg_cond = $user->lang['UCP_EMAIL_ACTIVATE'];
@@ -464,8 +464,8 @@ class ucp_register
'EMAIL_CONFIRM' => $data['email_confirm'],
'L_REG_COND' => $l_reg_cond,
- 'L_USERNAME_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
- 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
+ 'L_USERNAME_EXPLAIN' => sprintf($user->lang[phpbb::$config['allow_name_chars'] . '_EXPLAIN'], phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']),
+ 'L_PASSWORD_EXPLAIN' => sprintf($user->lang[phpbb::$config['pass_complex'] . '_EXPLAIN'], phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']),
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_TZ_OPTIONS' => tz_select($data['tz']),
diff --git a/phpBB/modules/ucp/ucp_remind.php b/phpBB/modules/ucp/ucp_remind.php
index 550051ae18..2a921a52b2 100644
--- a/phpBB/modules/ucp/ucp_remind.php
+++ b/phpBB/modules/ucp/ucp_remind.php
@@ -27,7 +27,7 @@ class ucp_remind
function main($id, $mode)
{
- global $db, $user, $auth, $template, $config;
+ global $db, $user, $auth, $template;
$username = request_var('username', '', true);
$email = strtolower(request_var('email', ''));
@@ -78,7 +78,7 @@ class ucp_remind
$key_len = 54 - strlen($server_url);
$key_len = max(6, $key_len); // we want at least 6
- $key_len = ($config['max_pass_chars']) ? min($key_len, $config['max_pass_chars']) : $key_len; // we want at most $config['max_pass_chars']
+ $key_len = (phpbb::$config['max_pass_chars']) ? min($key_len, phpbb::$config['max_pass_chars']) : $key_len; // we want at most phpbb::$config['max_pass_chars']
$user_actkey = substr(gen_rand_string(10), 0, $key_len);
$user_password = gen_rand_string(8);
diff --git a/phpBB/modules/ucp/ucp_resend.php b/phpBB/modules/ucp/ucp_resend.php
index 38b333a5a4..cde79ccabd 100644
--- a/phpBB/modules/ucp/ucp_resend.php
+++ b/phpBB/modules/ucp/ucp_resend.php
@@ -27,7 +27,7 @@ class ucp_resend
function main($id, $mode)
{
- global $db, $user, $auth, $template, $config;
+ global $db, $user, $auth, $template;
$username = request_var('username', '', true);
$email = strtolower(request_var('email', ''));
@@ -88,18 +88,18 @@ class ucp_resend
include_once(PHPBB_ROOT_PATH . 'includes/functions_messenger.' . PHP_EXT);
$messenger = new messenger(false);
- if ($config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_SELF || $coppa)
{
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
$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' => generate_board_url() . '/ucp.' . PHP_EXT . "?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}")
);
@@ -107,16 +107,16 @@ class ucp_resend
if ($coppa)
{
$messenger->assign_vars(array(
- 'FAX_INFO' => $config['coppa_fax'],
- 'MAIL_INFO' => $config['coppa_mail'],
- 'EMAIL_ADDRESS' => $user_row['user_email'])
- );
+ 'FAX_INFO' => phpbb::$config['coppa_fax'],
+ 'MAIL_INFO' => phpbb::$config['coppa_mail'],
+ 'EMAIL_ADDRESS' => $user_row['user_email'],
+ ));
}
$messenger->send(NOTIFY_EMAIL);
}
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ if (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN)
{
// Grab an array of user_id's with a_user permissions ... these users can activate a user
$admin_ary = $auth->acl_get_list(false, 'a_user', false);
@@ -145,7 +145,7 @@ class ucp_resend
meta_refresh(3, append_sid('index'));
- $message = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT'];
+ $message = (phpbb::$config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT'];
$message .= '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid('index') . '">', '</a>');
trigger_error($message);
}
diff --git a/phpBB/modules/ucp/ucp_zebra.php b/phpBB/modules/ucp/ucp_zebra.php
index a928e9985a..060aa7d9a7 100644
--- a/phpBB/modules/ucp/ucp_zebra.php
+++ b/phpBB/modules/ucp/ucp_zebra.php
@@ -26,7 +26,7 @@ class ucp_zebra
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template;
+ global $db, $user, $auth, $template;
$submit = phpbb_request::is_set_post('submit') || phpbb_request::is_set('add', phpbb_request::GET) || phpbb_request::is_set('remove', phpbb_request::GET);
$s_hidden_fields = '';