diff options
Diffstat (limited to 'phpBB/modules/mcp')
-rw-r--r-- | phpBB/modules/mcp/mcp_ban.php | 4 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_forum.php | 12 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_front.php | 52 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_logs.php | 10 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_main.php | 18 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_notes.php | 15 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_post.php | 44 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_queue.php | 36 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_reports.php | 27 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_topic.php | 32 | ||||
-rw-r--r-- | phpBB/modules/mcp/mcp_warn.php | 14 |
11 files changed, 130 insertions, 134 deletions
diff --git a/phpBB/modules/mcp/mcp_ban.php b/phpBB/modules/mcp/mcp_ban.php index 0a0452ccf9..bcf895ebeb 100644 --- a/phpBB/modules/mcp/mcp_ban.php +++ b/phpBB/modules/mcp/mcp_ban.php @@ -133,7 +133,7 @@ class mcp_ban acp_ban::display_ban_options($mode); - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_TITLE' => $this->page_title, 'L_EXPLAIN' => $l_ban_explain, 'L_UNBAN_TITLE' => $l_unban_title, @@ -206,7 +206,7 @@ class mcp_ban if ($pre_fill) { - $template->assign_var('BAN_QUANTIFIER', $pre_fill); + phpbb::$template->assign_var('BAN_QUANTIFIER', $pre_fill); } } } diff --git a/phpBB/modules/mcp/mcp_forum.php b/phpBB/modules/mcp/mcp_forum.php index 1a9028d232..e09ed93923 100644 --- a/phpBB/modules/mcp/mcp_forum.php +++ b/phpBB/modules/mcp/mcp_forum.php @@ -100,7 +100,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total; $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'ACTION' => $action, 'FORUM_NAME' => $forum_info['forum_name'], 'FORUM_DESCRIPTION' => generate_text_for_display($forum_info['forum_desc'], $forum_info['forum_desc_uid'], $forum_info['forum_desc_bitfield'], $forum_info['forum_desc_options']), @@ -285,7 +285,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) )); } - $template->assign_block_vars('topicrow', $topic_row); + phpbb::$template->assign_block_vars('topicrow', $topic_row); } unset($topic_rows); } @@ -339,12 +339,12 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) { if (!sizeof($topic_ids)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_TOPIC_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_TOPIC_SELECTED']); return; } if (!$to_topic_id) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); return; } @@ -352,7 +352,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) if (!sizeof($topic_data)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); return; } @@ -378,7 +378,7 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) if (!sizeof($post_id_list)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); return; } diff --git a/phpBB/modules/mcp/mcp_front.php b/phpBB/modules/mcp/mcp_front.php index 932c5e9b1e..65177792ae 100644 --- a/phpBB/modules/mcp/mcp_front.php +++ b/phpBB/modules/mcp/mcp_front.php @@ -32,7 +32,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); + phpbb::$template->assign_var('S_SHOW_UNAPPROVED', (!empty($forum_list)) ? true : false); if (!empty($forum_list)) { @@ -96,7 +96,7 @@ function mcp_front_view($id, $mode, $action) $row['forum_id'] = $global_id; } - $template->assign_block_vars('unapproved', array( + phpbb::$template->assign_block_vars('unapproved', array( 'U_POST_DETAILS' => append_sid('mcp', 'i=queue&mode=approve_details&f=' . $row['forum_id'] . '&p=' . $row['post_id']), 'U_MCP_FORUM' => (!$global_topic) ? append_sid('mcp', 'i=main&mode=forum_view&f=' . $row['forum_id']) : '', 'U_MCP_TOPIC' => append_sid('mcp', 'i=main&mode=topic_view&f=' . $row['forum_id'] . '&t=' . $row['topic_id']), @@ -112,29 +112,29 @@ function mcp_front_view($id, $mode, $action) 'POST_ID' => $row['post_id'], 'TOPIC_TITLE' => $row['topic_title'], 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : phpbb::$user->lang['NO_SUBJECT'], - 'POST_TIME' => phpbb::$user->format_date($row['post_time'])) - ); + 'POST_TIME' => phpbb::$user->format_date($row['post_time']), + )); } phpbb::$db->sql_freeresult($result); } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_MCP_QUEUE_ACTION' => append_sid('mcp', 'i=queue'), )); if ($total == 0) { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_UNAPPROVED_TOTAL' => phpbb::$user->lang['UNAPPROVED_POSTS_ZERO_TOTAL'], - 'S_HAS_UNAPPROVED_POSTS' => false) - ); + 'S_HAS_UNAPPROVED_POSTS' => false, + )); } else { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_UNAPPROVED_TOTAL' => ($total == 1) ? phpbb::$user->lang['UNAPPROVED_POST_TOTAL'] : sprintf(phpbb::$user->lang['UNAPPROVED_POSTS_TOTAL'], $total), - 'S_HAS_UNAPPROVED_POSTS' => true) - ); + 'S_HAS_UNAPPROVED_POSTS' => true, + )); } } } @@ -144,7 +144,7 @@ function mcp_front_view($id, $mode, $action) { $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_report'))); - $template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false); + phpbb::$template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false); if (!empty($forum_list)) { @@ -199,7 +199,7 @@ function mcp_front_view($id, $mode, $action) $row['forum_id'] = $global_id; } - $template->assign_block_vars('report', array( + phpbb::$template->assign_block_vars('report', array( 'U_POST_DETAILS' => append_sid('mcp', 'f=' . $row['forum_id'] . '&p=' . $row['post_id'] . "&i=reports&mode=report_details"), 'U_MCP_FORUM' => (!$global_topic) ? append_sid('mcp', 'f=' . $row['forum_id'] . "&i=$id&mode=forum_view") : '', 'U_MCP_TOPIC' => append_sid('mcp', 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"), @@ -227,17 +227,17 @@ function mcp_front_view($id, $mode, $action) if ($total == 0) { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_REPORTS_TOTAL' => phpbb::$user->lang['REPORTS_ZERO_TOTAL'], - 'S_HAS_REPORTS' => false) - ); + 'S_HAS_REPORTS' => false, + )); } else { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_REPORTS_TOTAL' => ($total == 1) ? phpbb::$user->lang['REPORT_TOTAL'] : sprintf(phpbb::$user->lang['REPORTS_TOTAL'], $total), - 'S_HAS_REPORTS' => true) - ); + 'S_HAS_REPORTS' => true, + )); } } } @@ -258,24 +258,24 @@ function mcp_front_view($id, $mode, $action) foreach ($log as $row) { - $template->assign_block_vars('log', array( + phpbb::$template->assign_block_vars('log', array( 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'TIME' => phpbb::$user->format_date($row['time']), 'ACTION' => $row['action'], 'U_VIEW_TOPIC' => (!empty($row['viewtopic'])) ? $row['viewtopic'] : '', - 'U_VIEWLOGS' => (!empty($row['viewlogs'])) ? $row['viewlogs'] : '') - ); + 'U_VIEWLOGS' => (!empty($row['viewlogs'])) ? $row['viewlogs'] : '', + )); } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_SHOW_LOGS' => (!empty($forum_list)) ? true : false, - 'S_HAS_LOGS' => (!empty($log)) ? true : false) - ); + 'S_HAS_LOGS' => (!empty($log)) ? true : false, + )); } - $template->assign_var('S_MCP_ACTION', append_sid('mcp')); + phpbb::$template->assign_var('S_MCP_ACTION', append_sid('mcp')); make_jumpbox(append_sid('mcp', 'i=main&mode=forum_view'), 0, false, 'm_', true); } diff --git a/phpBB/modules/mcp/mcp_logs.php b/phpBB/modules/mcp/mcp_logs.php index 5fe8ff1df1..9bfbef5c7b 100644 --- a/phpBB/modules/mcp/mcp_logs.php +++ b/phpBB/modules/mcp/mcp_logs.php @@ -166,7 +166,7 @@ class mcp_logs $log_count = 0; 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( + phpbb::$template->assign_vars(array( 'PAGE_NUMBER' => on_page($log_count, phpbb::$config['topics_per_page'], $start), 'TOTAL' => ($log_count == 1) ? phpbb::$user->lang['TOTAL_LOG'] : sprintf(phpbb::$user->lang['TOTAL_LOGS'], $log_count), 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, phpbb::$config['topics_per_page'], $start), @@ -179,8 +179,7 @@ class mcp_logs 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, 'S_LOGS' => ($log_count > 0), - ) - ); + )); foreach ($log_data as $row) { @@ -195,15 +194,14 @@ class mcp_logs } } - $template->assign_block_vars('log', array( + phpbb::$template->assign_block_vars('log', array( 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => phpbb::$user->format_date($row['time']), 'ACTION' => $row['action'], 'DATA' => (sizeof($data)) ? implode(' | ', $data) : '', 'ID' => $row['id'], - ) - ); + )); } } } diff --git a/phpBB/modules/mcp/mcp_main.php b/phpBB/modules/mcp/mcp_main.php index 2d172075ca..8a9a930678 100644 --- a/phpBB/modules/mcp/mcp_main.php +++ b/phpBB/modules/mcp/mcp_main.php @@ -490,11 +490,11 @@ function change_topic_type($action, $topic_ids) if ($global_involved) { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_FORUM_SELECT' => make_forum_select(request_var('f', $forum_id), false, false, true, true), 'S_CAN_LEAVE_SHADOW' => false, - 'ADDITIONAL_MSG' => (sizeof($topic_ids) == 1) ? phpbb::$user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENT'] : phpbb::$user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENTS']) - ); + 'ADDITIONAL_MSG' => (sizeof($topic_ids) == 1) ? phpbb::$user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENT'] : phpbb::$user->lang['SELECT_FORUM_GLOBAL_ANNOUNCEMENTS'], + )); confirm_box(false, $l_new_type, build_hidden_fields($s_hidden_fields), 'mcp_move.html'); } @@ -705,11 +705,11 @@ function mcp_move_topic($topic_ids) } else { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true), 'S_CAN_LEAVE_SHADOW' => true, - 'ADDITIONAL_MSG' => $additional_msg) - ); + 'ADDITIONAL_MSG' => $additional_msg, + )); confirm_box(false, 'MOVE_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html'); } @@ -1172,11 +1172,11 @@ function mcp_fork_topic($topic_ids) } else { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_FORUM_SELECT' => make_forum_select($to_forum_id, false, false, true, true, true), 'S_CAN_LEAVE_SHADOW' => false, - 'ADDITIONAL_MSG' => $additional_msg) - ); + 'ADDITIONAL_MSG' => $additional_msg, + )); confirm_box(false, 'FORK_TOPIC' . ((sizeof($topic_ids) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_move.html'); } diff --git a/phpBB/modules/mcp/mcp_notes.php b/phpBB/modules/mcp/mcp_notes.php index 44dcec52c6..b39f10428c 100644 --- a/phpBB/modules/mcp/mcp_notes.php +++ b/phpBB/modules/mcp/mcp_notes.php @@ -45,7 +45,7 @@ class mcp_notes switch ($mode) { case 'front': - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp&field=username&select_single=true'), 'U_POST_ACTION' => append_sid('mcp', 'i=notes&mode=user_notes'), @@ -193,21 +193,21 @@ class mcp_notes if ($log_count) { - $template->assign_var('S_USER_NOTES', true); + phpbb::$template->assign_var('S_USER_NOTES', true); foreach ($log_data as $row) { - $template->assign_block_vars('usernotes', array( + phpbb::$template->assign_block_vars('usernotes', array( 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => phpbb::$user->format_date($row['time']), 'ACTION' => $row['action'], 'IP' => $row['ip'], - 'ID' => $row['id']) - ); + 'ID' => $row['id'], + )); } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, @@ -229,8 +229,7 @@ class mcp_notes 'AVATAR_IMG' => $avatar_img, 'RANK_IMG' => $rank_img, - ) - ); + )); } } diff --git a/phpBB/modules/mcp/mcp_post.php b/phpBB/modules/mcp/mcp_post.php index 0c21fc5dc5..2f3320dd07 100644 --- a/phpBB/modules/mcp/mcp_post.php +++ b/phpBB/modules/mcp/mcp_post.php @@ -49,7 +49,7 @@ function mcp_post_details($id, $mode, $action) $ip = request_var('ip', ''); include(PHPBB_ROOT_PATH . 'includes/functions_user.' . PHP_EXT); - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'RETURN_POST' => sprintf(phpbb::$user->lang['RETURN_POST'], '<a href="' . append_sid('mcp', "i=$id&mode=$mode&p=$post_id") . '">', '</a>'), 'U_RETURN_POST' => append_sid('mcp', "i=$id&mode=$mode&p=$post_id"), 'L_RETURN_POST' => sprintf(phpbb::$user->lang['RETURN_POST'], '', ''), @@ -162,18 +162,18 @@ function mcp_post_details($id, $mode, $action) // Display not already displayed Attachments for this post, we already parsed them. ;) if (!empty($attachments)) { - $template->assign_var('S_HAS_ATTACHMENTS', true); + phpbb::$template->assign_var('S_HAS_ATTACHMENTS', true); foreach ($attachments as $attachment) { - $template->assign_block_vars('attachment', array( - 'DISPLAY_ATTACHMENT' => $attachment) - ); + phpbb::$template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment, + )); } } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_MCP_ACTION' => "$url&i=main&quickmod=1", // Use this for mode paramaters 'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters 'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f={$post_info['forum_id']}"), @@ -230,16 +230,16 @@ function mcp_post_details($id, $mode, $action) if ($log_count) { - $template->assign_var('S_USER_NOTES', true); + phpbb::$template->assign_var('S_USER_NOTES', true); foreach ($log_data as $row) { - $template->assign_block_vars('usernotes', array( + phpbb::$template->assign_block_vars('usernotes', array( 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => phpbb::$user->format_date($row['time']), 'ACTION' => $row['action'], - 'ID' => $row['id']) - ); + 'ID' => $row['id'], + )); } } @@ -256,7 +256,7 @@ function mcp_post_details($id, $mode, $action) if ($row = phpbb::$db->sql_fetchrow($result)) { - $template->assign_var('S_SHOW_REPORTS', true); + phpbb::$template->assign_var('S_SHOW_REPORTS', true); do { @@ -267,7 +267,7 @@ function mcp_post_details($id, $mode, $action) $row['reason_title'] = phpbb::$user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; } - $template->assign_block_vars('reports', array( + phpbb::$template->assign_block_vars('reports', array( 'REPORT_ID' => $row['report_id'], 'REASON_TITLE' => $row['reason_title'], 'REASON_DESC' => $row['reason_description'], @@ -290,9 +290,9 @@ function mcp_post_details($id, $mode, $action) if ($rdns_ip_num != 'all') { - $template->assign_vars(array( - 'U_LOOKUP_ALL' => "$url&i=main&mode=post_details&rdns=all") - ); + phpbb::$template->assign_vars(array( + 'U_LOOKUP_ALL' => "$url&i=main&mode=post_details&rdns=all", + )); } // Get other users who've posted under this IP @@ -330,14 +330,14 @@ function mcp_post_details($id, $mode, $action) foreach ($users_ary as $user_id => $user_row) { - $template->assign_block_vars('userrow', array( + phpbb::$template->assign_block_vars('userrow', array( 'USERNAME' => ($user_id == ANONYMOUS) ? phpbb::$user->lang['GUEST'] : $user_row['username'], 'NUM_POSTS' => $user_row['postings'], 'L_POST_S' => ($user_row['postings'] == 1) ? phpbb::$user->lang['POST'] : phpbb::$user->lang['POSTS'], 'U_PROFILE' => ($user_id == ANONYMOUS) ? '' : append_sid('memberlist', 'mode=viewprofile&u=' . $user_id), - 'U_SEARCHPOSTS' => append_sid('search', 'author_id=' . $user_id . '&sr=topics')) - ); + 'U_SEARCHPOSTS' => append_sid('search', 'author_id=' . $user_id . '&sr=topics'), + )); } } @@ -358,15 +358,15 @@ function mcp_post_details($id, $mode, $action) { $hostname = (($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') && $row['poster_ip']) ? @gethostbyaddr($row['poster_ip']) : ''; - $template->assign_block_vars('iprow', array( + phpbb::$template->assign_block_vars('iprow', array( 'IP' => $row['poster_ip'], 'HOSTNAME' => $hostname, 'NUM_POSTS' => $row['postings'], 'L_POST_S' => ($row['postings'] == 1) ? phpbb::$user->lang['POST'] : phpbb::$user->lang['POSTS'], 'U_LOOKUP_IP' => ($rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? '' : "$url&i=$id&mode=post_details&rdns={$row['poster_ip']}#ip", - 'U_WHOIS' => append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$row['poster_ip']}")) - ); + 'U_WHOIS' => append_sid('mcp', "i=$id&mode=$mode&action=whois&p=$post_id&ip={$row['poster_ip']}"), + )); } phpbb::$db->sql_freeresult($result); @@ -382,7 +382,7 @@ function mcp_post_details($id, $mode, $action) } } - $template->assign_var('S_USER_SELECT', $user_select); + phpbb::$template->assign_var('S_USER_SELECT', $user_select); } } diff --git a/phpBB/modules/mcp/mcp_queue.php b/phpBB/modules/mcp/mcp_queue.php index b429ffea32..147a63cf59 100644 --- a/phpBB/modules/mcp/mcp_queue.php +++ b/phpBB/modules/mcp/mcp_queue.php @@ -102,10 +102,10 @@ class mcp_queue if ($post_info['topic_first_post_id'] != $post_id && topic_review($post_info['topic_id'], $post_info['forum_id'], 'topic_review', 0, false)) { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_TOPIC_REVIEW' => true, - 'TOPIC_TITLE' => $post_info['topic_title']) - ); + 'TOPIC_TITLE' => $post_info['topic_title'], + )); } $extensions = $attachments = $topic_tracking_info = array(); @@ -163,13 +163,13 @@ class mcp_queue // Display not already displayed Attachments for this post, we already parsed them. ;) if (!empty($attachments)) { - $template->assign_var('S_HAS_ATTACHMENTS', true); + phpbb::$template->assign_var('S_HAS_ATTACHMENTS', true); foreach ($attachments as $attachment) { - $template->assign_block_vars('attachment', array( - 'DISPLAY_ATTACHMENT' => $attachment) - ); + phpbb::$template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment, + )); } } } @@ -177,7 +177,7 @@ class mcp_queue $post_url = append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']); $topic_url = append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']); - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_MCP_QUEUE' => true, 'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&p=$post_id&f=$forum_id"), 'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']), @@ -413,7 +413,7 @@ class mcp_queue $row['post_username'] = phpbb::$user->lang['GUEST']; } - $template->assign_block_vars('postrow', array( + phpbb::$template->assign_block_vars('postrow', array( 'U_TOPIC' => append_sid('viewtopic', 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), 'U_VIEWFORUM' => (!$global_topic) ? append_sid('viewforum', 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid('viewtopic', 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''), @@ -428,13 +428,13 @@ class mcp_queue 'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : phpbb::$user->lang['GLOBAL_ANNOUNCEMENT'], 'POST_SUBJECT' => $row['post_subject'], 'TOPIC_TITLE' => $row['topic_title'], - 'POST_TIME' => phpbb::$user->format_date($row['post_time'])) - ); + 'POST_TIME' => phpbb::$user->format_date($row['post_time']), + )); } unset($rowset, $forum_names); // Now display the page - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_DISPLAY_ITEMS' => ($mode == 'unapproved_posts') ? phpbb::$user->lang['DISPLAY_POSTS'] : phpbb::$user->lang['DISPLAY_TOPICS'], 'L_EXPLAIN' => ($mode == 'unapproved_posts') ? phpbb::$user->lang['MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN'] : phpbb::$user->lang['MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN'], 'L_TITLE' => ($mode == 'unapproved_posts') ? phpbb::$user->lang['MCP_QUEUE_UNAPPROVED_POSTS'] : phpbb::$user->lang['MCP_QUEUE_UNAPPROVED_TOPICS'], @@ -749,10 +749,10 @@ function approve_post($post_id_list, $id, $mode) } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_NOTIFY_POSTER' => $show_notify, - 'S_APPROVE' => true) - ); + 'S_APPROVE' => true, + )); confirm_box(false, 'APPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html'); } @@ -1040,12 +1040,12 @@ function disapprove_post($post_id_list, $id, $mode) } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_NOTIFY_POSTER' => $show_notify, 'S_APPROVE' => false, 'REASON' => $reason, - 'ADDITIONAL_MSG' => $additional_msg) - ); + 'ADDITIONAL_MSG' => $additional_msg, + )); confirm_box(false, 'DISAPPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html'); } diff --git a/phpBB/modules/mcp/mcp_reports.php b/phpBB/modules/mcp/mcp_reports.php index d79abb209e..01f8a8fac6 100644 --- a/phpBB/modules/mcp/mcp_reports.php +++ b/phpBB/modules/mcp/mcp_reports.php @@ -112,10 +112,10 @@ class mcp_reports if (topic_review($post_info['topic_id'], $post_info['forum_id'], 'topic_review', 0, false)) { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_TOPIC_REVIEW' => true, - 'TOPIC_TITLE' => $post_info['topic_title']) - ); + 'TOPIC_TITLE' => $post_info['topic_title'], + )); } $topic_tracking_info = $extensions = $attachments = array(); @@ -172,18 +172,18 @@ class mcp_reports // Display not already displayed Attachments for this post, we already parsed them. ;) if (!empty($attachments)) { - $template->assign_var('S_HAS_ATTACHMENTS', true); + phpbb::$template->assign_var('S_HAS_ATTACHMENTS', true); foreach ($attachments as $attachment) { - $template->assign_block_vars('attachment', array( - 'DISPLAY_ATTACHMENT' => $attachment) - ); + phpbb::$template->assign_block_vars('attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment, + )); } } } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'S_MCP_REPORT' => true, 'S_CLOSE_ACTION' => append_sid('mcp', 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'S_CAN_VIEWIP' => phpbb::$acl->acl_get('m_info', $post_info['forum_id']), @@ -382,7 +382,7 @@ class mcp_reports $row['forum_id'] = $global_id; } - $template->assign_block_vars('postrow', array( + phpbb::$template->assign_block_vars('postrow', array( 'U_VIEWFORUM' => (!$global_topic) ? append_sid('viewforum', 'f=' . $row['forum_id']) : '', 'U_VIEWPOST' => append_sid('viewtopic', 'f=' . $row['forum_id'] . '&p=' . $row['post_id']) . '#p' . $row['post_id'], 'U_VIEW_DETAILS' => append_sid('mcp', "i=reports&start=$start&mode=report_details&f={$row['forum_id']}&r={$row['report_id']}"), @@ -403,15 +403,15 @@ class mcp_reports 'POST_TIME' => phpbb::$user->format_date($row['post_time']), 'REPORT_ID' => $row['report_id'], 'REPORT_TIME' => phpbb::$user->format_date($row['report_time']), - 'TOPIC_TITLE' => $row['topic_title']) - ); + 'TOPIC_TITLE' => $row['topic_title'], + )); } phpbb::$db->sql_freeresult($result); unset($report_ids, $row); } // Now display the page - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'L_EXPLAIN' => ($mode == 'reports') ? phpbb::$user->lang['MCP_REPORTS_OPEN_EXPLAIN'] : phpbb::$user->lang['MCP_REPORTS_CLOSED_EXPLAIN'], 'L_TITLE' => ($mode == 'reports') ? phpbb::$user->lang['MCP_REPORTS_OPEN'] : phpbb::$user->lang['MCP_REPORTS_CLOSED'], 'L_ONLY_TOPIC' => ($topic_id) ? sprintf(phpbb::$user->lang['ONLY_TOPIC'], $topic_info['topic_title']) : '', @@ -425,8 +425,7 @@ class mcp_reports 'TOPIC_ID' => $topic_id, 'TOTAL' => $total, 'TOTAL_REPORTS' => ($total == 1) ? phpbb::$user->lang['LIST_REPORT'] : sprintf(phpbb::$user->lang['LIST_REPORTS'], $total), - ) - ); + )); $this->tpl_name = 'mcp_reports'; break; diff --git a/phpBB/modules/mcp/mcp_topic.php b/phpBB/modules/mcp/mcp_topic.php index ab7bd0e983..c5a8a3fa88 100644 --- a/phpBB/modules/mcp/mcp_topic.php +++ b/phpBB/modules/mcp/mcp_topic.php @@ -215,7 +215,7 @@ function mcp_topic_view($id, $mode, $action) $post_unread = (isset($topic_tracking_info[$topic_id]) && $row['post_time'] > $topic_tracking_info[$topic_id]) ? true : false; - $template->assign_block_vars('postrow', array( + phpbb::$template->assign_block_vars('postrow', array( 'POST_AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'POST_AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), 'POST_AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']), @@ -236,17 +236,17 @@ function mcp_topic_view($id, $mode, $action) 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details" . (($forum_id) ? "&f=$forum_id" : ''), 'U_MCP_APPROVE' => (phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', - 'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') - ); + 'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', + )); // Display not already displayed Attachments for this post, we already parsed them. ;) if (!empty($attachments[$row['post_id']])) { foreach ($attachments[$row['post_id']] as $attachment) { - $template->assign_block_vars('postrow.attachment', array( - 'DISPLAY_ATTACHMENT' => $attachment) - ); + phpbb::$template->assign_block_vars('postrow.attachment', array( + 'DISPLAY_ATTACHMENT' => $attachment, + )); } } @@ -287,7 +287,7 @@ function mcp_topic_view($id, $mode, $action) 'post_ids' => $post_id_list, )); - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'TOPIC_TITLE' => $topic_info['topic_title'], 'U_VIEW_TOPIC' => append_sid('viewtopic', 'f=' . $topic_info['forum_id'] . '&t=' . $topic_info['topic_id']), @@ -340,7 +340,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) if (!sizeof($post_id_list)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); return; } @@ -354,7 +354,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) if (!sizeof($post_info)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); return; } @@ -364,13 +364,13 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) // Make some tests if (!$subject) { - $template->assign_var('MESSAGE', phpbb::$user->lang['EMPTY_SUBJECT']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['EMPTY_SUBJECT']); return; } if ($to_forum_id <= 0) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_DESTINATION_FORUM']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_DESTINATION_FORUM']); return; } @@ -378,7 +378,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) if (!sizeof($forum_info)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['USER_CANNOT_POST']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['USER_CANNOT_POST']); return; } @@ -386,7 +386,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) if ($forum_info['forum_type'] != FORUM_POST) { - $template->assign_var('MESSAGE', phpbb::$user->lang['FORUM_NOT_POSTABLE']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['FORUM_NOT_POSTABLE']); return; } @@ -527,7 +527,7 @@ function merge_posts($topic_id, $to_topic_id) { if (!$to_topic_id) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); return; } @@ -535,7 +535,7 @@ function merge_posts($topic_id, $to_topic_id) if (!sizeof($topic_data)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_FINAL_TOPIC_SELECTED']); return; } @@ -546,7 +546,7 @@ function merge_posts($topic_id, $to_topic_id) if (!sizeof($post_id_list)) { - $template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); + phpbb::$template->assign_var('MESSAGE', phpbb::$user->lang['NO_POST_SELECTED']); return; } diff --git a/phpBB/modules/mcp/mcp_warn.php b/phpBB/modules/mcp/mcp_warn.php index d3fbdccc2c..6b3f896ae4 100644 --- a/phpBB/modules/mcp/mcp_warn.php +++ b/phpBB/modules/mcp/mcp_warn.php @@ -73,7 +73,7 @@ class mcp_warn */ function mcp_warn_front_view() { - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&form=mcp&field=username&select_single=true'), 'U_POST_ACTION' => append_sid('mcp', 'i=warn&mode=warn_user'), )); @@ -87,7 +87,7 @@ class mcp_warn foreach ($highest as $row) { - $template->assign_block_vars('highest', array( + phpbb::$template->assign_block_vars('highest', array( 'U_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $row['user_id']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), @@ -109,7 +109,7 @@ class mcp_warn while ($row = phpbb::$db->sql_fetchrow($result)) { - $template->assign_block_vars('latest', array( + phpbb::$template->assign_block_vars('latest', array( 'U_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $row['user_id']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), @@ -154,7 +154,7 @@ class mcp_warn foreach ($users as $row) { - $template->assign_block_vars('user', array( + phpbb::$template->assign_block_vars('user', array( 'U_NOTES' => append_sid('mcp', 'i=notes&mode=user_notes&u=' . $row['user_id']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), @@ -167,7 +167,7 @@ class mcp_warn )); } - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, 'S_CLEAR_ALLOWED' => (phpbb::$acl->acl_get('a_clearlogs')) ? true : false, 'S_SELECT_SORT_DIR' => $s_sort_dir, @@ -299,7 +299,7 @@ class mcp_warn $rank_title = $rank_img = ''; $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']); - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, 'POST' => $message, @@ -404,7 +404,7 @@ class mcp_warn $avatar_img = get_user_avatar($user_row['user_avatar'], $user_row['user_avatar_type'], $user_row['user_avatar_width'], $user_row['user_avatar_height']); // OK, they didn't submit a warning so lets build the page for them to do so - $template->assign_vars(array( + phpbb::$template->assign_vars(array( 'U_POST_ACTION' => $this->u_action, 'USERNAME' => $user_row['username'], |