diff options
Diffstat (limited to 'phpBB/modules/mcp')
-rw-r--r-- | phpBB/modules/mcp/mcp_ban.php | 2 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_forum.php | 8 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_front.php | 4 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_logs.php | 10 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_main.php | 8 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_notes.php | 10 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_post.php | 12 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_queue.php | 22 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_reports.php | 12 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_topic.php | 10 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_warn.php | 24 |
11 files changed, 61 insertions, 61 deletions
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 . "&i=$id&action=$action&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 . "&$u_sort_param", $log_count, $config['topics_per_page'], $start), + 'PAGINATION' => generate_pagination($this->u_action . "&$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 . "&st=$st&sk=$sk&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 . "&st=$st&sk=$sk&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 . "&f=$forum_id&st=$sort_days&sk=$sort_key&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 . "&f=$forum_id&st=$sort_days&sk=$sort_key&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 . "&f=$forum_id&t=$topic_id&st=$sort_days&sk=$sort_key&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 . "&f=$forum_id&t=$topic_id&st=$sort_days&sk=$sort_key&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'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $to_forum_id . '&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&form=mcp&field=username&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&mode=list&st=$st&sk=$sk&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&mode=list&st=$st&sk=$sk&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(); |