1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 22:58:10 +01:00

$template to phpbb::$template

git-svn-id: file:///svn/phpbb/trunk@9337 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-02-22 18:56:09 +00:00
parent 84f795e9fb
commit b27add94f8
76 changed files with 1215 additions and 1244 deletions

View File

@ -23,11 +23,11 @@ phpbb::$acl->init(phpbb::$user->data);
phpbb::$user->setup();
// Set custom template for admin area
$template->set_custom_template(PHPBB_ROOT_PATH . phpbb::$base_config['admin_folder'] . '/style', 'admin');
phpbb::$template->set_custom_template(PHPBB_ROOT_PATH . phpbb::$base_config['admin_folder'] . '/style', 'admin');
$template->set_filenames(array(
'body' => 'colour_swatch.html')
);
phpbb::$template->set_filenames(array(
'body' => 'colour_swatch.html',
));
$form = request_var('form', '');
$name = request_var('name', '');
@ -36,7 +36,7 @@ $name = request_var('name', '');
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'OPENER' => $form,
'NAME' => $name,
'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
@ -46,7 +46,7 @@ $template->assign_vars(array(
'S_CONTENT_ENCODING' => 'UTF-8',
));
$template->display('body');
phpbb::$template->display('body');
garbage_collection();

View File

@ -43,28 +43,28 @@ foreach (phpbb::$user->help as $help_ary)
{
if ($help_ary[0] == '--')
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $help_ary[1])
);
phpbb::$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $help_ary[1],
));
continue;
}
$template->assign_block_vars('faq_block.faq_row', array(
phpbb::$template->assign_block_vars('faq_block.faq_row', array(
'FAQ_QUESTION' => $help_ary[0],
'FAQ_ANSWER' => $help_ary[1])
);
'FAQ_ANSWER' => $help_ary[1],
));
}
// Lets build a page ...
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => phpbb::$user->lang['BACK_TO_TOP'])
);
'L_BACK_TO_TOP' => phpbb::$user->lang['BACK_TO_TOP'],
));
page_header($l_title);
$template->set_filenames(array(
phpbb::$template->set_filenames(array(
'body' => 'faq_body.html')
);
make_jumpbox(append_sid('viewforum'));

View File

@ -72,30 +72,30 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
function get_template()
{
$template->set_filenames(array(
'captcha' => 'captcha_default.html')
);
phpbb::$template->set_filenames(array(
'captcha' => 'captcha_default.html',
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CONFIRM_IMAGE' => append_sid('ucp', 'mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type),
'CONFIRM_ID' => $this->confirm_id,
));
return $template->assign_display('captcha');
return phpbb::$template->assign_display('captcha');
}
function get_demo_template($id)
{
$template->set_filenames(array(
'captcha_demo' => 'captcha_default_acp_demo.html')
);
phpbb::$template->set_filenames(array(
'captcha_demo' => 'captcha_default_acp_demo.html',
));
// acp_captcha has a delivery function; let's use it
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CONFIRM_IMAGE' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'captcha_demo=1&mode=visual&i=' . $id . '&select_captcha=' . $this->get_class_name()),
'CONFIRM_ID' => $this->confirm_id,
));
return $template->assign_display('captcha_demo');
return phpbb::$template->assign_display('captcha_demo');
}
function get_hidden_fields()

View File

@ -86,9 +86,10 @@ class phpbb_captcha_gd extends phpbb_default_captcha implements phpbb_captcha_pl
foreach ($captcha_vars as $captcha_var => $template_var)
{
$var = request_var($captcha_var, (int) phpbb::$config[$captcha_var]);
$template->assign_var($template_var, $var);
phpbb::$template->assign_var($template_var, $var);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_class_name(),
));

View File

@ -92,9 +92,10 @@ class phpbb_recaptcha extends phpbb_default_captcha implements phpbb_captcha_plu
foreach ($captcha_vars as $captcha_var => $template_var)
{
$var = request_var($captcha_var, (isset(phpbb::$config[$captcha_var])) ? (string) phpbb::$config[$captcha_var] : '');
$template->assign_var($template_var, $var);
phpbb::$template->assign_var($template_var, $var);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_class_name(),
));
@ -117,18 +118,18 @@ class phpbb_recaptcha extends phpbb_default_captcha implements phpbb_captcha_plu
function get_template()
{
$template->set_filenames(array(
'captcha' => 'captcha_recaptcha.html')
);
phpbb::$template->set_filenames(array(
'captcha' => 'captcha_recaptcha.html',
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'RECAPTCHA_SERVER' => self::recaptcha_server,
'RECAPTCHA_PUBKEY' => isset(phpbb::$config['recaptcha_pubkey']) ? phpbb::$config['recaptcha_pubkey'] : '',
'RECAPTCHA_ERRORGET' => '',
'S_RECAPTCHA_AVAILABLE' => self::is_available(),
));
return $template->assign_display('captcha');
return phpbb::$template->assign_display('captcha');
}
function get_demo_template($id)

View File

@ -1002,7 +1002,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
$tpl_prefix . 'BASE_URL' => $base_url,
'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
$tpl_prefix . 'PER_PAGE' => $per_page,
@ -1026,9 +1026,9 @@ function on_page($num_items, $per_page, $start)
$on_page = floor($start / $per_page) + 1;
$template->assign_vars(array(
'ON_PAGE' => $on_page)
);
phpbb::$template->assign_vars(array(
'ON_PAGE' => $on_page,
));
return phpbb::$user->lang('PAGE_OF', $on_page, max(ceil($num_items / $per_page), 1));
}
@ -1054,7 +1054,7 @@ function add_form_key($form_name)
'form_token' => $token,
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FORM_TOKEN' => $s_fields,
));
}
@ -1167,9 +1167,9 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
page_header((!isset(phpbb::$user->lang[$title])) ? phpbb::$user->lang['CONFIRM'] : phpbb::$user->lang[$title]);
$template->set_filenames(array(
'body' => $html_body)
);
phpbb::$template->set_filenames(array(
'body' => $html_body,
));
// If activation key already exist, we better do not re-use the key (something very strange is going on...)
if (request_var('confirm_key', ''))
@ -1183,14 +1183,14 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
$u_action = reapply_sid($use_page);
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MESSAGE_TITLE' => (!isset(phpbb::$user->lang[$title])) ? phpbb::$user->lang['CONFIRM'] : phpbb::$user->lang[$title],
'MESSAGE_TEXT' => (!isset(phpbb::$user->lang[$title . '_CONFIRM'])) ? $title : phpbb::$user->lang[$title . '_CONFIRM'],
'YES_VALUE' => phpbb::$user->lang['YES'],
'S_CONFIRM_ACTION' => $u_action,
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields,
));
$sql = 'UPDATE ' . USERS_TABLE . " SET user_last_confirm_key = '" . phpbb::$db->sql_escape($confirm_key) . "'
WHERE user_id = " . phpbb::$user->data['user_id'];
@ -1321,7 +1321,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
$captcha->init(CONFIRM_LOGIN);
$captcha->reset();
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CONFIRM_CODE' => true,
'CONFIRM' => $captcha->get_template(''),
));
@ -1405,8 +1405,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
));
phpbb::$template->set_filenames(array(
'body' => 'login_body.html')
);
'body' => 'login_body.html',
));
page_header(phpbb::$user->lang['LOGIN'], false);
make_jumpbox('viewforum');
@ -1473,18 +1473,18 @@ function login_forum_box($forum_data)
return true;
}
$template->assign_var('LOGIN_ERROR', phpbb::$user->lang['WRONG_PASSWORD']);
phpbb::$template->assign_var('LOGIN_ERROR', phpbb::$user->lang['WRONG_PASSWORD']);
}
page_header(phpbb::$user->lang['LOGIN']);
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])))
);
phpbb::$template->assign_vars(array(
'S_HIDDEN_FIELDS' => build_hidden_fields(array('f' => $forum_data['forum_id'])),
));
$template->set_filenames(array(
'body' => 'login_forum.html')
);
phpbb::$template->set_filenames(array(
'body' => 'login_forum.html',
));
page_footer();
}

View File

@ -286,8 +286,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_FOLDER_IMG_SRC' => '',
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . PHPBB_ROOT_PATH . $row['forum_image'] . '" alt="' . phpbb::$user->lang['FORUM_CAT'] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? PHPBB_ROOT_PATH . $row['forum_image'] : '',
'U_VIEWFORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $row['forum_id']))
);
'U_VIEWFORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $row['forum_id']),
));
continue;
}
@ -457,8 +457,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
phpbb::$template->assign_block_vars('forumrow.subforum', array(
'U_SUBFORUM' => $subforum['link'],
'SUBFORUM_NAME' => $subforum['name'],
'S_UNREAD' => $subforum['unread'])
);
'S_UNREAD' => $subforum['unread'],
));
}
$last_catless = $catless;
@ -468,8 +468,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'U_MARK_FORUMS' => (phpbb::$user->is_registered || phpbb::$config['load_anon_lastread']) ? phpbb::$url->append_sid('viewforum', 'hash=' . generate_link_hash('global') . '&amp;f=' . $root_data['forum_id'] . '&amp;mark=forums') : '',
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
'L_SUBFORUM' => phpbb::$user->lang('SUBFORUMS', $visible_forums),
'LAST_POST_IMG' => phpbb::$user->img('icon_topic_latest', 'VIEW_LATEST_POST'))
);
'LAST_POST_IMG' => phpbb::$user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
));
if ($return_moderators)
{
@ -494,11 +494,11 @@ function generate_forum_rules(&$forum_data)
$forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FORUM_RULES' => true,
'U_FORUM_RULES' => $forum_data['forum_rules_link'],
'FORUM_RULES' => $forum_data['forum_rules'])
);
'FORUM_RULES' => $forum_data['forum_rules'],
));
}
/**
@ -528,31 +528,31 @@ function generate_forum_nav(&$forum_data)
continue;
}
$template->assign_block_vars('navlinks', array(
phpbb::$template->assign_block_vars('navlinks', array(
'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false,
'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false,
'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false,
'FORUM_NAME' => $parent_name,
'FORUM_ID' => $parent_forum_id,
'U_VIEW_FORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $parent_forum_id))
);
'U_VIEW_FORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $parent_forum_id),
));
}
}
$template->assign_block_vars('navlinks', array(
phpbb::$template->assign_block_vars('navlinks', array(
'S_IS_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
'S_IS_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
'S_IS_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_ID' => $forum_data['forum_id'],
'U_VIEW_FORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $forum_data['forum_id']))
);
'U_VIEW_FORUM' => phpbb::$url->append_sid('viewforum', 'f=' . $forum_data['forum_id']),
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'FORUM_ID' => $forum_data['forum_id'],
'FORUM_NAME' => $forum_data['forum_name'],
'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']))
);
'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']),
));
return;
}
@ -741,7 +741,7 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status)
foreach ($rules as $rule)
{
$template->assign_block_vars('rules', array('RULE' => $rule));
phpbb::$template->assign_block_vars('rules', array('RULE' => $rule));
}
return;
@ -838,7 +838,7 @@ function display_custom_bbcodes()
$i = 0;
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('custom_tags', array(
phpbb::$template->assign_block_vars('custom_tags', array(
'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2),
'BBCODE_TAG' => $row['bbcode_tag'],
@ -870,12 +870,12 @@ function display_reasons($reason_id = 0)
$row['reason_title'] = phpbb::$user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
}
$template->assign_block_vars('reason', array(
phpbb::$template->assign_block_vars('reason', array(
'ID' => $row['reason_id'],
'TITLE' => $row['reason_title'],
'DESCRIPTION' => $row['reason_description'],
'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false)
);
'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false,
));
}
phpbb::$db->sql_freeresult($result);
}
@ -974,7 +974,7 @@ function display_user_activity(&$userdata)
$l_active_pct = ($userdata['user_id'] != ANONYMOUS && $userdata['user_id'] == phpbb::$user->data['user_id']) ? phpbb::$user->lang['POST_PCT_ACTIVE_OWN'] : phpbb::$user->lang['POST_PCT_ACTIVE'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ACTIVE_FORUM' => $active_f_name,
'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf(phpbb::$user->lang['USER_POST'], 1) : sprintf(phpbb::$user->lang['USER_POSTS'], $active_f_count),
'ACTIVE_FORUM_PCT' => sprintf($l_active_pct, $active_f_pct),

View File

@ -41,9 +41,9 @@ function generate_smilies($mode, $forum_id)
page_header(phpbb::$user->lang['SMILIES']);
$template->set_filenames(array(
'body' => 'posting_smilies.html')
);
phpbb::$template->set_filenames(array(
'body' => 'posting_smilies.html',
));
}
$display_link = false;
@ -83,23 +83,23 @@ function generate_smilies($mode, $forum_id)
{
foreach ($smilies as $row)
{
$template->assign_block_vars('smiley', array(
phpbb::$template->assign_block_vars('smiley', array(
'SMILEY_CODE' => $row['code'],
'A_SMILEY_CODE' => addslashes($row['code']),
'SMILEY_IMG' => PHPBB_ROOT_PATH . phpbb::$config['smilies_path'] . '/' . $row['smiley_url'],
'SMILEY_WIDTH' => $row['smiley_width'],
'SMILEY_HEIGHT' => $row['smiley_height'],
'SMILEY_DESC' => $row['emotion'])
);
'SMILEY_DESC' => $row['emotion'],
));
}
}
if ($mode == 'inline' && $display_link)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_SMILEY_LINK' => true,
'U_MORE_SMILIES' => append_sid('posting', 'mode=smilies&amp;f=' . $forum_id))
);
'U_MORE_SMILIES' => append_sid('posting', 'mode=smilies&amp;f=' . $forum_id),
));
}
if ($mode == 'window')
@ -246,7 +246,7 @@ function posting_gen_topic_icons($mode, $icon_id)
if (!$icon_id)
{
$template->assign_var('S_NO_ICON_CHECKED', ' checked="checked"');
phpbb::$template->assign_var('S_NO_ICON_CHECKED', ' checked="checked"');
}
if (sizeof($icons))
@ -255,15 +255,15 @@ function posting_gen_topic_icons($mode, $icon_id)
{
if ($data['display'])
{
$template->assign_block_vars('topic_icon', array(
phpbb::$template->assign_block_vars('topic_icon', array(
'ICON_ID' => $id,
'ICON_IMG' => PHPBB_ROOT_PATH . phpbb::$config['icons_path'] . '/' . $data['img'],
'ICON_WIDTH' => $data['width'],
'ICON_HEIGHT' => $data['height'],
'S_CHECKED' => ($id == $icon_id) ? true : false,
'S_ICON_CHECKED' => ($id == $icon_id) ? ' checked="checked"' : '')
);
'S_ICON_CHECKED' => ($id == $icon_id) ? ' checked="checked"' : '',
));
}
}
@ -319,13 +319,13 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
foreach ($topic_type_array as $array)
{
$template->assign_block_vars('topic_type', $array);
phpbb::$template->assign_block_vars('topic_type', $array);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_TOPIC_TYPE_STICKY' => (phpbb::$acl->acl_get('f_sticky', $forum_id)),
'S_TOPIC_TYPE_ANNOUNCE' => (phpbb::$acl->acl_get('f_announce', $forum_id)))
);
'S_TOPIC_TYPE_ANNOUNCE' => (phpbb::$acl->acl_get('f_announce', $forum_id)),
));
}
return $toggle;
@ -738,7 +738,7 @@ function posting_gen_inline_attachments(&$attachment_data)
$s_inline_attachment_options .= '<option value="' . $i . '">' . basename($attachment['real_filename']) . '</option>';
}
$template->assign_var('S_INLINE_ATTACHMENT_OPTIONS', $s_inline_attachment_options);
phpbb::$template->assign_var('S_INLINE_ATTACHMENT_OPTIONS', $s_inline_attachment_options);
return true;
}
@ -752,7 +752,7 @@ function posting_gen_inline_attachments(&$attachment_data)
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
{
// Some default template variables
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_ATTACH_BOX' => $show_attach_box,
'S_HAS_ATTACHMENTS' => sizeof($attachment_data),
'FILESIZE' => phpbb::$config['max_filesize'],
@ -776,7 +776,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
$download_link = append_sid('download/file', 'mode=view&amp;id=' . (int) $attach_row['attach_id'], true, ($attach_row['is_orphan']) ? phpbb::$user->session_id : false);
$template->assign_block_vars('attach_row', array(
phpbb::$template->assign_block_vars('attach_row', array(
'FILENAME' => basename($attach_row['real_filename']),
'A_FILENAME' => addslashes(basename($attach_row['real_filename'])),
'FILE_COMMENT' => $attach_row['attach_comment'],
@ -785,8 +785,8 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
'ASSOC_INDEX' => $count,
'U_VIEW_ATTACHMENT' => $download_link,
'S_HIDDEN' => $hidden)
);
'S_HIDDEN' => $hidden,
));
}
}
@ -856,7 +856,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
}
unset($topic_ids);
$template->assign_var('S_SHOW_DRAFTS', true);
phpbb::$template->assign_var('S_SHOW_DRAFTS', true);
foreach ($draft_rows as $draft)
{
@ -893,7 +893,7 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
$insert_url = append_sid('ucp', "i=$id&amp;mode=compose&amp;d={$draft['draft_id']}");
}
$template->assign_block_vars('draftrow', array(
phpbb::$template->assign_block_vars('draftrow', array(
'DRAFT_ID' => $draft['draft_id'],
'DATE' => phpbb::$user->format_date($draft['save_time']),
'DRAFT_SUBJECT' => $draft['draft_subject'],
@ -904,8 +904,8 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0)
'S_LINK_PM' => $link_pm,
'S_LINK_TOPIC' => $link_topic,
'S_LINK_FORUM' => $link_forum)
);
'S_LINK_FORUM' => $link_forum,
));
}
}
@ -1037,7 +1037,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
$post_subject = censor_text($post_subject);
$template->assign_block_vars($mode . '_row', array(
phpbb::$template->assign_block_vars($mode . '_row', array(
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
@ -1053,17 +1053,17 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_ID' => $row['post_id'],
'U_MINI_POST' => append_sid('viewtopic', 'p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_MCP_DETAILS' => (phpbb::$acl->acl_get('m_info', $forum_id)) ? append_sid('mcp', 'i=main&amp;mode=post_details&amp;f=' . $forum_id . '&amp;p=' . $row['post_id'], true, phpbb::$user->session_id) : '',
'POSTER_QUOTE' => ($show_quote_button && phpbb::$acl->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
);
'POSTER_QUOTE' => ($show_quote_button && phpbb::$acl->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
));
// 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($mode . '_row.attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
phpbb::$template->assign_block_vars($mode . '_row.attachment', array(
'DISPLAY_ATTACHMENT' => $attachment,
));
}
}
@ -1072,7 +1072,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
if ($mode == 'topic_review')
{
$template->assign_var('QUOTE_IMG', phpbb::$user->img('icon_post_quote', 'REPLY_WITH_QUOTE'));
phpbb::$template->assign_var('QUOTE_IMG', phpbb::$user->img('icon_post_quote', 'REPLY_WITH_QUOTE'));
}
return true;

View File

@ -191,7 +191,7 @@ function get_folder($user_id, $folder_id = false)
{
$folder_id_name = ($f_id == PRIVMSGS_INBOX) ? 'inbox' : (($f_id == PRIVMSGS_OUTBOX) ? 'outbox' : 'sentbox');
$template->assign_block_vars('folder', array(
phpbb::$template->assign_block_vars('folder', array(
'FOLDER_ID' => $f_id,
'FOLDER_NAME' => $folder_ary['folder_name'],
'NUM_MESSAGES' => $folder_ary['num_messages'],
@ -201,8 +201,8 @@ function get_folder($user_id, $folder_id = false)
'S_CUR_FOLDER' => ($f_id === $folder_id) ? true : false,
'S_UNREAD_MESSAGES' => ($folder_ary['unread_messages']) ? true : false,
'S_CUSTOM_FOLDER' => ($f_id > 0) ? true : false)
);
'S_CUSTOM_FOLDER' => ($f_id > 0) ? true : false,
));
}
if ($folder_id !== false && !isset($folder[$folder_id]))
@ -1189,7 +1189,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
if (sizeof($address) && !$plaintext)
{
$template->assign_var('S_' . strtoupper($check_type) . '_RECIPIENT', true);
phpbb::$template->assign_var('S_' . strtoupper($check_type) . '_RECIPIENT', true);
foreach ($address as $type => $adr_ary)
{
@ -1218,7 +1218,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
));
}
$template->assign_block_vars($check_type . '_recipient', $tpl_ary);
phpbb::$template->assign_block_vars($check_type . '_recipient', $tpl_ary);
}
}
}
@ -1768,7 +1768,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$previous_history_pm = $prev_id;
}
$template->assign_block_vars('history_row', array(
phpbb::$template->assign_block_vars('history_row', array(
'MESSAGE_AUTHOR_QUOTE' => (($decoded_message) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''),
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
@ -1788,13 +1788,13 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
'MSG_ID' => $row['msg_id'],
'U_VIEW_MESSAGE' => "$url&amp;f=$folder_id&amp;p=" . $row['msg_id'],
'U_QUOTE' => (!$in_post_mode && phpbb::$acl->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != phpbb::$user->data['user_id']) ? "$url&amp;mode=compose&amp;action=quote&amp;f=" . $folder_id . "&amp;p=" . $row['msg_id'] : '',
'U_POST_REPLY_PM' => ($author_id != phpbb::$user->data['user_id'] && $author_id != ANONYMOUS && phpbb::$acl->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '')
);
'U_POST_REPLY_PM' => ($author_id != phpbb::$user->data['user_id'] && $author_id != ANONYMOUS && phpbb::$acl->acl_get('u_sendpm')) ? "$url&amp;mode=compose&amp;action=reply&amp;f=$folder_id&amp;p=" . $row['msg_id'] : '',
));
unset($rowset[$id]);
$prev_id = $id;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'QUOTE_IMG' => phpbb::$user->img('icon_post_quote', 'REPLY_WITH_QUOTE'),
'HISTORY_TITLE' => $title,

View File

@ -71,13 +71,13 @@ class custom_profile
// Some types are multivalue, we can't give them a field_id as we would not know which to pick
$type = (int) $row['field_type'];
$template->assign_block_vars('profile_fields', array(
phpbb::$template->assign_block_vars('profile_fields', array(
'LANG_NAME' => $row['lang_name'],
'LANG_EXPLAIN' => $row['lang_explain'],
'FIELD' => $tpl_snippet,
'FIELD_ID' => ($type == FIELD_DATE || ($type == FIELD_BOOL && $row['field_length'] == '1')) ? '' : 'pf_' . $row['field_ident'],
'S_REQUIRED' => ($row['field_required']) ? true : false)
);
'S_REQUIRED' => ($row['field_required']) ? true : false,
));
}
phpbb::$db->sql_freeresult($result);
}
@ -602,7 +602,7 @@ class custom_profile
private function generate_int($profile_row, $preview = false)
{
$profile_row['field_value'] = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
@ -659,7 +659,7 @@ class custom_profile
unset($now);
$profile_row['field_value'] = 0;
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
@ -671,7 +671,7 @@ class custom_profile
$value = $this->get_var('int', $profile_row, $profile_row['field_default_value'], $preview);
$profile_row['field_value'] = $value;
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
if ($profile_row['field_length'] == 1)
{
@ -682,11 +682,11 @@ class custom_profile
foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
{
$template->assign_block_vars('bool.options', array(
phpbb::$template->assign_block_vars('bool.options', array(
'OPTION_ID' => $option_id,
'CHECKED' => ($value == $option_id) ? ' checked="checked"' : '',
'VALUE' => $option_value)
);
'VALUE' => $option_value,
));
}
}
}
@ -698,7 +698,7 @@ class custom_profile
private function generate_string($profile_row, $preview = false)
{
$profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
@ -712,7 +712,7 @@ class custom_profile
$profile_row['field_cols'] = $field_length[1];
$profile_row['field_value'] = $this->get_var('string', $profile_row, $profile_row['lang_default_value'], $preview);
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
}
/**
@ -729,15 +729,15 @@ class custom_profile
}
$profile_row['field_value'] = $value;
$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
phpbb::$template->assign_block_vars(self::$profile_types[$profile_row['field_type']], array_change_key_case($profile_row, CASE_UPPER));
foreach ($this->options_lang[$profile_row['field_id']][$profile_row['lang_id']] as $option_id => $option_value)
{
$template->assign_block_vars('dropdown.options', array(
phpbb::$template->assign_block_vars('dropdown.options', array(
'OPTION_ID' => $option_id,
'SELECTED' => ($value == $option_id) ? ' selected="selected"' : '',
'VALUE' => $option_value)
);
'VALUE' => $option_value,
));
}
}
@ -751,14 +751,14 @@ class custom_profile
$preview = ($mode == 'preview') ? true : false;
// set template filename
$template->set_filenames(array(
'cp_body' => 'custom_profile_fields.html')
);
phpbb::$template->set_filenames(array(
'cp_body' => 'custom_profile_fields.html',
));
// empty previously filled blockvars
foreach (self::$profile_types as $field_case => $field_type)
{
$template->destroy_block_vars($field_type);
phpbb::$template->destroy_block_vars($field_type);
}
// Assign template variables
@ -766,7 +766,7 @@ class custom_profile
$this->$type_func($profile_row, $preview);
// Return templated data
return $template->assign_display('cp_body');
return phpbb::$template->assign_display('cp_body');
}
/**

View File

@ -1980,30 +1980,30 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
$s_category_options .= '<option value="' . $cat . '"' . (($cat == $category) ? ' selected="selected"' : '') . '>' . $cat . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_AVATARS_ENABLED' => true,
'S_IN_AVATAR_GALLERY' => true,
'S_CAT_OPTIONS' => $s_category_options)
);
'S_CAT_OPTIONS' => $s_category_options,
));
$avatar_list = (isset($avatar_list[$category])) ? $avatar_list[$category] : array();
foreach ($avatar_list as $avatar_row_ary)
{
$template->assign_block_vars($block_var, array());
phpbb::$template->assign_block_vars($block_var, array());
foreach ($avatar_row_ary as $avatar_col_ary)
{
$template->assign_block_vars($block_var . '.avatar_column', array(
phpbb::$template->assign_block_vars($block_var . '.avatar_column', array(
'AVATAR_IMAGE' => PHPBB_ROOT_PATH . phpbb::$config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
'AVATAR_NAME' => $avatar_col_ary['name'],
'AVATAR_FILE' => $avatar_col_ary['filename'])
);
'AVATAR_FILE' => $avatar_col_ary['filename'],
));
$template->assign_block_vars($block_var . '.avatar_option_column', array(
phpbb::$template->assign_block_vars($block_var . '.avatar_option_column', array(
'AVATAR_IMAGE' => PHPBB_ROOT_PATH . phpbb::$config['avatar_gallery_path'] . '/' . $avatar_col_ary['file'],
'S_OPTIONS_AVATAR' => $avatar_col_ary['filename'])
);
'S_OPTIONS_AVATAR' => $avatar_col_ary['filename'],
));
}
}

View File

@ -94,7 +94,7 @@ class install_update extends module
}
// Set custom template again. ;)
$template->set_custom_template('../adm/style', 'admin');
phpbb::$template->set_custom_template('../adm/style', 'admin');
// Get current and latest version
if (($latest_version = phpbb::$acm->get('version_info')) === false)
@ -115,10 +115,10 @@ class install_update extends module
// Check for a valid update directory, else point the user to the phpbb.com website
if (!file_exists(PHPBB_ROOT_PATH . 'install/update') || !file_exists(PHPBB_ROOT_PATH . 'install/update/index.php') || !file_exists($this->old_location) || !file_exists($this->new_location))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => ($up_to_date) ? phpbb::$user->lang['NO_UPDATE_FILES_UP_TO_DATE'] : sprintf(phpbb::$user->lang['NO_UPDATE_FILES_OUTDATED'], phpbb::$config['version'], $this->current_version, $this->latest_version))
);
'ERROR_MSG' => ($up_to_date) ? phpbb::$user->lang['NO_UPDATE_FILES_UP_TO_DATE'] : sprintf(phpbb::$user->lang['NO_UPDATE_FILES_OUTDATED'], phpbb::$config['version'], $this->current_version, $this->latest_version),
));
return;
}
@ -129,10 +129,10 @@ class install_update extends module
// Since admins are able to run the update/checks more than once we only check if the current version is lower or equal than the version to which we update to.
if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '>'))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => sprintf(phpbb::$user->lang['INCOMPATIBLE_UPDATE_FILES'], phpbb::$config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']))
);
'ERROR_MSG' => sprintf(phpbb::$user->lang['INCOMPATIBLE_UPDATE_FILES'], phpbb::$config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']),
));
return;
}
@ -142,10 +142,10 @@ class install_update extends module
{
$this->unequal_version = true;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_WARNING' => true,
'WARNING_MSG' => sprintf(phpbb::$user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version))
);
'WARNING_MSG' => sprintf(phpbb::$user->lang['OLD_UPDATE_FILES'], $this->update_info['version']['from'], $this->update_info['version']['to'], $this->latest_version),
));
}
if ($this->test_update === false)
@ -186,7 +186,7 @@ class install_update extends module
case 'intro':
$this->page_title = 'UPDATE_INSTALLATION';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_INTRO' => true,
'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=version_check"),
));
@ -199,7 +199,7 @@ class install_update extends module
case 'version_check':
$this->page_title = 'STAGE_VERSION_CHECK';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_UP_TO_DATE' => $up_to_date,
'S_VERSION_CHECK' => true,
@ -207,13 +207,13 @@ class install_update extends module
'U_DB_UPDATE_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_db"),
'LATEST_VERSION' => $this->latest_version,
'CURRENT_VERSION' => $this->current_version)
);
'CURRENT_VERSION' => $this->current_version,
));
// Print out version the update package updates to
if ($this->unequal_version)
{
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
phpbb::$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
}
break;
@ -244,7 +244,7 @@ class install_update extends module
phpbb::$acm->purge();
// Redirect the user to the database update script with some explanations...
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DB_UPDATE' => true,
'S_DB_UPDATE_FINISHED' => (phpbb::$config['version'] == $this->update_info['version']['to']) ? true : false,
'U_DB_UPDATE' => append_sid('install/database_update', 'type=1&amp;language=' . phpbb::$user->data['user_lang']),
@ -302,7 +302,7 @@ class install_update extends module
$refresh_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check");
meta_refresh(2, $refresh_url);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_IN_PROGRESS' => true,
'S_COLLECTED' => (int) $update_list['status'],
'S_TO_COLLECT' => sizeof($this->update_info['files']),
@ -322,10 +322,10 @@ class install_update extends module
if (sizeof($update_list['no_update']))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_NO_UPDATE_FILES' => true,
'NO_UPDATE_FILES' => implode(', ', array_map('htmlspecialchars', $update_list['no_update'])))
);
'NO_UPDATE_FILES' => implode(', ', array_map('htmlspecialchars', $update_list['no_update'])),
));
}
// Now assign the list to the template
@ -336,14 +336,13 @@ class install_update extends module
continue;
}
$template->assign_block_vars('files', array(
phpbb::$template->assign_block_vars('files', array(
'S_STATUS' => true,
'STATUS' => $status,
'L_STATUS' => phpbb::$user->lang['STATUS_' . strtoupper($status)],
'TITLE' => phpbb::$user->lang['FILES_' . strtoupper($status)],
'EXPLAIN' => phpbb::$user->lang['FILES_' . strtoupper($status) . '_EXPLAIN'],
)
);
));
foreach ($filelist as $file_struct)
{
@ -363,7 +362,7 @@ class install_update extends module
$diff_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check&amp;action=diff&amp;status=$status&amp;file=" . urlencode($file_struct['filename']));
$template->assign_block_vars('files', array(
phpbb::$template->assign_block_vars('files', array(
'STATUS' => $status,
'FILENAME' => $filename,
@ -396,7 +395,7 @@ class install_update extends module
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FILE_CHECK' => true,
'S_ALL_UP_TO_DATE' => $all_up_to_date,
'S_VERSION_UP_TO_DATE' => $up_to_date,
@ -620,7 +619,7 @@ class install_update extends module
$redirect_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files&amp;" . implode('&amp;', $params));
meta_refresh(3, $redirect_url);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_IN_PROGRESS' => true,
'L_IN_PROGRESS' => phpbb::$user->lang['MERGING_FILES'],
'L_IN_PROGRESS_EXPLAIN' => phpbb::$user->lang['MERGING_FILES_EXPLAIN'],
@ -744,12 +743,12 @@ class install_update extends module
$radio_buttons .= '<label><input type="radio"' . ((!$radio_buttons) ? ' id="use_method"' : '') . ' class="radio" value="' . $method . '" name="use_method" /> ' . $method . '</label>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DOWNLOAD_FILES' => true,
'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=update_files"),
'RADIO_BUTTONS' => $radio_buttons,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
// To ease the update process create a file location map
$update_list = phpbb::$acm->get('update_list');
@ -769,7 +768,7 @@ class install_update extends module
continue;
}
$template->assign_block_vars('location', array(
phpbb::$template->assign_block_vars('location', array(
'SOURCE' => htmlspecialchars($file_struct['filename']),
'DESTINATION' => $script_path . htmlspecialchars($file_struct['filename']),
));
@ -845,7 +844,7 @@ class install_update extends module
$requested_data = call_user_func(array($method, 'data'));
foreach ($requested_data as $data => $default)
{
$template->assign_block_vars('data', array(
phpbb::$template->assign_block_vars('data', array(
'DATA' => $data,
'NAME' => phpbb::$user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => phpbb::$user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
@ -853,7 +852,7 @@ class install_update extends module
));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CONNECTION_SUCCESS' => ($test_ftp_connection && $test_connection === true) ? true : false,
'S_CONNECTION_FAILED' => ($test_ftp_connection && $test_connection !== true) ? true : false,
'ERROR_MSG' => ($test_ftp_connection && $test_connection !== true) ? phpbb::$user->lang[$test_connection] : '',
@ -987,10 +986,10 @@ class install_update extends module
{
$transfer->close_session();
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_UPLOAD_SUCCESS' => true,
'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"))
);
'U_ACTION' => append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check"),
));
return;
}
@ -1054,7 +1053,7 @@ class install_update extends module
$diff = $this->return_diff(array(), ($option == MERGE_NO_MERGE_NEW) ? $this->new_location . $original_file : PHPBB_ROOT_PATH . $file);
$template->assign_var('S_DIFF_NEW_FILE', true);
phpbb::$template->assign_var('S_DIFF_NEW_FILE', true);
$diff_mode = 'inline';
$this->page_title = 'VIEWING_FILE_CONTENTS';
@ -1074,7 +1073,7 @@ class install_update extends module
unset($tmp);
$template->assign_var('S_DIFF_NEW_FILE', true);
phpbb::$template->assign_var('S_DIFF_NEW_FILE', true);
$diff_mode = 'inline';
$this->page_title = 'VIEWING_FILE_CONTENTS';
@ -1084,10 +1083,10 @@ class install_update extends module
$diff = $this->return_diff($this->old_location . $original_file, PHPBB_ROOT_PATH . $file, $this->new_location . $original_file);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DIFF_CONFLICT_FILE' => true,
'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true))
);
'NUM_CONFLICTS' => $diff->merged_output(false, false, false, true),
));
$diff = $this->return_diff(PHPBB_ROOT_PATH . $file, $diff->merged_output());
break;
@ -1105,7 +1104,7 @@ class install_update extends module
$diff = $this->return_diff(array(), ($option == MERGE_NO_MERGE_NEW) ? $this->new_location . $original_file : PHPBB_ROOT_PATH . $file);
$template->assign_var('S_DIFF_NEW_FILE', true);
phpbb::$template->assign_var('S_DIFF_NEW_FILE', true);
$diff_mode = 'inline';
$this->page_title = 'VIEWING_FILE_CONTENTS';
@ -1126,7 +1125,7 @@ class install_update extends module
$diff = $this->return_diff(array(), $this->new_location . $original_file);
$template->assign_var('S_DIFF_NEW_FILE', true);
phpbb::$template->assign_var('S_DIFF_NEW_FILE', true);
$diff_mode = 'inline';
$this->page_title = 'VIEWING_FILE_CONTENTS';
@ -1149,7 +1148,7 @@ class install_update extends module
$renderer = new $render_class();
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'DIFF_CONTENT' => $renderer->get_diff_content($diff),
'DIFF_MODE' => $diff_mode,
'S_DIFF_MODE_OPTIONS' => $diff_mode_options,

View File

@ -26,7 +26,7 @@ phpbb::$user->setup('mcp');
$module = new p_master();
// Setting a variable to let the style designer know where he is...
$template->assign_var('S_IN_MCP', true);
phpbb::$template->assign_var('S_IN_MCP', true);
// Basic parameter data
$id = request_var('i', '');
@ -234,7 +234,7 @@ $module->load_active();
$module->assign_tpl_vars(append_sid(PHPBB_ROOT_PATH . 'mcp.' . PHP_EXT));
// Generate urls for letting the moderation control panel being accessed in different modes
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_MCP' => append_sid('mcp', 'i=main'),
'U_MCP_FORUM' => ($forum_id) ? append_sid('mcp', "i=main&amp;mode=forum_view&amp;f=$forum_id") : '',
'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid('mcp', "i=main&amp;mode=topic_view&amp;t=$topic_id") : '',
@ -724,11 +724,11 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$s_limit_days = $s_sort_key = $s_sort_dir = $sort_url = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $sort_url);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_SORT_DIR' => $s_sort_dir,
'S_SELECT_SORT_KEY' => $s_sort_key,
'S_SELECT_SORT_DAYS' => $s_limit_days)
);
'S_SELECT_SORT_DAYS' => $s_limit_days,
));
if (($sort_days && $mode != 'viewlogs') || in_array($mode, array('reports', 'unapproved_topics', 'unapproved_posts')) || $where_sql != 'WHERE')
{

View File

@ -240,7 +240,7 @@ switch ($mode)
$rank_title = $rank_img = '';
get_user_rank($row['user_id'], $row['user_rank'], $row['user_posts'], $rank_title, $rank_img, $rank_img_src);
$template->assign_block_vars($which_row, array(
phpbb::$template->assign_block_vars($which_row, array(
'USER_ID' => $row['user_id'],
'FORUMS' => $s_forum_select,
'RANK_TITLE' => $rank_title,
@ -261,9 +261,9 @@ switch ($mode)
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
'PM_IMG' => phpbb::$user->img('icon_contact_pm', phpbb::$user->lang['SEND_PRIVATE_MESSAGE']))
);
phpbb::$template->assign_vars(array(
'PM_IMG' => phpbb::$user->img('icon_contact_pm', phpbb::$user->lang['SEND_PRIVATE_MESSAGE']),
));
break;
case 'contact':
@ -372,7 +372,7 @@ switch ($mode)
}
// Send vars to the template
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'IM_CONTACT' => $row[$sql_field],
'A_IM_CONTACT' => addslashes($row[$sql_field]),
@ -389,8 +389,8 @@ switch ($mode)
'L_IM_SENT_JABBER' => sprintf(phpbb::$user->lang['IM_SENT_JABBER'], $row['username']),
$s_select => true,
'S_IM_ACTION' => $s_action)
);
'S_IM_ACTION' => $s_action,
));
break;
@ -500,7 +500,7 @@ switch ($mode)
$poster_avatar = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
$template->assign_vars(show_profile($member));
phpbb::$template->assign_vars(show_profile($member));
// Custom Profile Fields
$profile_fields = array();
@ -543,7 +543,7 @@ switch ($mode)
$member['posts_in_queue'] = 0;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_POSTS_IN_QUEUE' => phpbb::$user->lang('NUM_POSTS_IN_QUEUE', $member['posts_in_queue']),
'POSTS_DAY' => sprintf(phpbb::$user->lang['POST_DAY'], $posts_per_day),
@ -583,14 +583,14 @@ switch ($mode)
if (!empty($profile_fields['row']))
{
$template->assign_vars($profile_fields['row']);
phpbb::$template->assign_vars($profile_fields['row']);
}
if (!empty($profile_fields['blockrow']))
{
foreach ($profile_fields['blockrow'] as $field_data)
{
$template->assign_block_vars('custom_fields', $field_data);
phpbb::$template->assign_block_vars('custom_fields', $field_data);
}
}
@ -620,10 +620,10 @@ switch ($mode)
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_USER_INACTIVE' => true,
'USER_INACTIVE_REASON' => $inactive_reason)
);
'USER_INACTIVE_REASON' => $inactive_reason,
));
}
// Now generate page title
@ -868,29 +868,29 @@ switch ($mode)
if ($user_id)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SEND_USER' => true,
'USERNAME' => $row['username'],
'L_EMAIL_BODY_EXPLAIN' => phpbb::$user->lang['EMAIL_BODY_EXPLAIN'],
'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;u=' . $user_id))
);
'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;u=' . $user_id),
));
}
else
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'EMAIL' => $email,
'NAME' => $name,
'S_LANG_OPTIONS' => language_select($email_lang),
'L_EMAIL_BODY_EXPLAIN' => phpbb::$user->lang['EMAIL_TOPIC_EXPLAIN'],
'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;t=' . $topic_id))
);
'S_POST_ACTION' => append_sid('memberlist', 'mode=email&amp;t=' . $topic_id),
));
}
$template->assign_vars(array(
'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '')
);
phpbb::$template->assign_vars(array(
'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
));
break;
@ -1148,7 +1148,7 @@ switch ($mode)
$rank_img_src = '';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'GROUP_DESC' => generate_text_for_display($group_row['group_desc'], $group_row['group_desc_uid'], $group_row['group_desc_bitfield'], $group_row['group_desc_options']),
'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
'GROUP_COLOR' => $group_row['group_colour'],
@ -1159,8 +1159,8 @@ switch ($mode)
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
'U_PM' => (phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && phpbb::$config['allow_privmsg'] && phpbb::$config['allow_mass_pm']) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
);
'U_PM' => (phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && phpbb::$config['allow_privmsg'] && phpbb::$config['allow_mass_pm']) ? append_sid('ucp', 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',
));
$sql_select = ', ug.group_leader';
$sql_from = ', ' . USER_GROUP_TABLE . ' ug ';
@ -1320,7 +1320,7 @@ switch ($mode)
trigger_error('NO_GROUP');
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'ICQ' => $icq,
@ -1344,8 +1344,8 @@ switch ($mode)
'S_JOINED_TIME_OPTIONS' => $s_find_join_time,
'S_ACTIVE_TIME_OPTIONS' => $s_find_active_time,
'S_GROUP_SELECT' => $s_group_select,
'S_USER_SEARCH_ACTION' => append_sid('memberlist', "mode=searchuser&amp;form=$form&amp;field=$field"))
);
'S_USER_SEARCH_ACTION' => append_sid('memberlist', "mode=searchuser&amp;form=$form&amp;field=$field"),
));
}
// Get us some users :D
@ -1454,13 +1454,13 @@ switch ($mode)
$memberrow = array_merge($memberrow, $cp_row['row']);
}
$template->assign_block_vars('memberrow', $memberrow);
phpbb::$template->assign_block_vars('memberrow', $memberrow);
if (isset($cp_row['blockrow']) && sizeof($cp_row['blockrow']))
{
foreach ($cp_row['blockrow'] as $field_data)
{
$template->assign_block_vars('memberrow.custom_fields', $field_data);
phpbb::$template->assign_block_vars('memberrow.custom_fields', $field_data);
}
}
@ -1469,7 +1469,7 @@ switch ($mode)
}
// Generate page
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PAGINATION' => generate_pagination($pagination_url, $total_users, phpbb::$config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($total_users, phpbb::$config['topics_per_page'], $start),
'TOTAL_USERS' => ($total_users == 1) ? phpbb::$user->lang['LIST_USER'] : sprintf(phpbb::$user->lang['LIST_USERS'], $total_users),
@ -1508,14 +1508,14 @@ switch ($mode)
'S_MODE_SELECT' => $s_sort_key,
'S_ORDER_SELECT' => $s_sort_dir,
'S_CHAR_OPTIONS' => $s_char_options,
'S_MODE_ACTION' => $pagination_url)
);
'S_MODE_ACTION' => $pagination_url,
));
}
// Output the page
page_header($page_title);
$template->set_filenames(array(
phpbb::$template->set_filenames(array(
'body' => $template_html)
);
make_jumpbox(append_sid('viewforum'));

View File

@ -66,11 +66,11 @@ class acp_attachments
$this->tpl_name = 'acp_attachments';
$this->page_title = $l_title;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang[$l_title],
'L_TITLE_EXPLAIN' => phpbb::$user->lang[$l_title . '_EXPLAIN'],
'U_ACTION' => $this->u_action)
);
'U_ACTION' => $this->u_action,
));
switch ($mode)
{
@ -175,7 +175,7 @@ class acp_attachments
}
}
$template->assign_var('S_ATTACHMENT_SETTINGS', true);
phpbb::$template->assign_var('S_ATTACHMENT_SETTINGS', true);
if ($action == 'imgmagick')
{
@ -204,10 +204,10 @@ class acp_attachments
$this->new_config['img_create_thumbnail'] = 0;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_SEARCH_IMAGICK' => $this->u_action . '&amp;action=imgmagick',
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true)
);
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true,
));
// Secure Download Options - Same procedure as with banning
$allow_deny = ($this->new_config['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED';
@ -230,7 +230,7 @@ class acp_attachments
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,
'S_WARNING' => (sizeof($error)) ? true : false,
@ -240,8 +240,8 @@ class acp_attachments
'L_SECURE_TITLE' => phpbb::$user->lang['DEFINE_' . $allow_deny . '_IPS'],
'L_IP_EXCLUDE' => phpbb::$user->lang['EXCLUDE_FROM_' . $allow_deny . '_IP'],
'L_REMOVE_IPS' => phpbb::$user->lang['REMOVE_' . $allow_deny . '_IPS'])
);
'L_REMOVE_IPS' => phpbb::$user->lang['REMOVE_' . $allow_deny . '_IPS'],
));
// Output relevant options
foreach ($display_vars['vars'] as $config_key => $vars)
@ -253,10 +253,10 @@ class acp_attachments
if (strpos($config_key, 'legend') !== false)
{
$template->assign_block_vars('options', array(
phpbb::$template->assign_block_vars('options', array(
'S_LEGEND' => true,
'LEGEND' => (isset(phpbb::$user->lang[$vars])) ? phpbb::$user->lang[$vars] : $vars)
);
'LEGEND' => (isset(phpbb::$user->lang[$vars])) ? phpbb::$user->lang[$vars] : $vars,
));
continue;
}
@ -279,14 +279,13 @@ class acp_attachments
continue;
}
$template->assign_block_vars('options', array(
phpbb::$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => phpbb::$user->lang[$vars['lang']],
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
);
));
unset($display_vars['vars'][$config_key]);
}
@ -397,11 +396,11 @@ class acp_attachments
phpbb::$acm->destroy('extensions');
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EXTENSIONS' => true,
'ADD_EXTENSION' => (isset($add_extension)) ? $add_extension : '',
'GROUP_SELECT_OPTIONS' => (phpbb_request::is_set_post('add_extension_check')) ? $this->group_select('add_group_select', $add_extension_group, 'extension_group') : $this->group_select('add_group_select', false, 'extension_group'))
);
'GROUP_SELECT_OPTIONS' => (phpbb_request::is_set_post('add_extension_check')) ? $this->group_select('add_group_select', $add_extension_group, 'extension_group') : $this->group_select('add_group_select', false, 'extension_group'),
));
$sql = 'SELECT *
FROM ' . EXTENSIONS_TABLE . '
@ -422,12 +421,12 @@ class acp_attachments
$old_group_id = $current_group_id;
}
$template->assign_block_vars('extensions', array(
phpbb::$template->assign_block_vars('extensions', array(
'S_SPACER' => $s_spacer,
'EXTENSION_ID' => $row['extension_id'],
'EXTENSION' => $row['extension'],
'GROUP_OPTIONS' => $this->group_select('group_select[]', $row['group_id']))
);
'GROUP_OPTIONS' => $this->group_select('group_select[]', $row['group_id']),
));
}
while ($row = phpbb::$db->sql_fetchrow($result));
}
@ -437,7 +436,7 @@ class acp_attachments
case 'ext_groups':
$template->assign_var('S_EXTENSION_GROUPS', true);
phpbb::$template->assign_var('S_EXTENSION_GROUPS', true);
if ($submit)
{
@ -738,7 +737,7 @@ class acp_attachments
$s_extension_options .= '<option' . ((!$row['group_id']) ? ' class="disabled"' : '') . ' value="' . $row['extension_id'] . '"' . (($row['group_id'] == $group_id && $group_id) ? ' selected="selected"' : '') . '>' . $row['extension'] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PHPBB_ROOT_PATH' => PHPBB_ROOT_PATH,
'IMG_PATH' => $img_path,
'ACTION' => $action,
@ -761,8 +760,8 @@ class acp_attachments
'U_EXTENSIONS' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=$id&amp;mode=extensions"),
'U_BACK' => $this->u_action,
'L_LEGEND' => phpbb::$user->lang[strtoupper($action) . '_EXTENSION_GROUP'])
);
'L_LEGEND' => phpbb::$user->lang[strtoupper($action) . '_EXTENSION_GROUP'],
));
$s_forum_id_options = '';
@ -833,9 +832,9 @@ class acp_attachments
phpbb::$db->sql_freeresult($result);
unset($padding_store);
$template->assign_vars(array(
'S_FORUM_ID_OPTIONS' => $s_forum_id_options)
);
phpbb::$template->assign_vars(array(
'S_FORUM_ID_OPTIONS' => $s_forum_id_options,
));
break;
}
@ -850,7 +849,7 @@ class acp_attachments
{
$s_add_spacer = ($old_allow_group != $row['allow_group'] || $old_allow_pm != $row['allow_in_pm']) ? true : false;
$template->assign_block_vars('groups', array(
phpbb::$template->assign_block_vars('groups', array(
'S_ADD_SPACER' => $s_add_spacer,
'S_ALLOWED_IN_PM' => ($row['allow_in_pm']) ? true : false,
'S_GROUP_ALLOWED' => ($row['allow_group']) ? true : false,
@ -860,8 +859,7 @@ class acp_attachments
'GROUP_NAME' => $row['group_name'],
'CATEGORY' => $cat_lang[$row['cat_id']],
)
);
));
$old_allow_group = $row['allow_group'];
$old_allow_pm = $row['allow_in_pm'];
@ -923,7 +921,7 @@ class acp_attachments
if (sizeof($upload_list))
{
$template->assign_var('S_UPLOADING_FILES', true);
phpbb::$template->assign_var('S_UPLOADING_FILES', true);
$sql = 'SELECT forum_id, forum_name
FROM ' . FORUMS_TABLE;
@ -960,11 +958,11 @@ class acp_attachments
{
$post_row = $post_info[$upload_list[$row['attach_id']]];
$template->assign_block_vars('upload', array(
phpbb::$template->assign_block_vars('upload', array(
'FILE_INFO' => sprintf(phpbb::$user->lang['UPLOADING_FILE_TO'], $row['real_filename'], $post_row['post_id']),
'S_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? true : false,
'L_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '')
);
'L_DENIED' => (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id'])) ? sprintf(phpbb::$user->lang['UPLOAD_DENIED_FORUM'], $forum_names[$row['forum_id']]) : '',
));
if (!phpbb::$acl->acl_get('f_attach', $post_row['forum_id']))
{
@ -1010,9 +1008,9 @@ class acp_attachments
}
}
$template->assign_vars(array(
'S_ORPHAN' => true)
);
phpbb::$template->assign_vars(array(
'S_ORPHAN' => true,
));
// Just get the files with is_orphan set and older than 3 hours
$sql = 'SELECT *
@ -1024,15 +1022,15 @@ class acp_attachments
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('orphan', array(
phpbb::$template->assign_block_vars('orphan', array(
'FILESIZE' => get_formatted_filesize($row['filesize']),
'FILETIME' => phpbb::$user->format_date($row['filetime']),
'REAL_FILENAME' => basename($row['real_filename']),
'PHYSICAL_FILENAME' => basename($row['physical_filename']),
'ATTACH_ID' => $row['attach_id'],
'POST_IDS' => (!empty($post_ids[$row['attach_id']])) ? $post_ids[$row['attach_id']] : '',
'U_FILE' => append_sid('download/file', 'mode=view&amp;id=' . $row['attach_id']))
);
'U_FILE' => append_sid('download/file', 'mode=view&amp;id=' . $row['attach_id']),
));
}
phpbb::$db->sql_freeresult($result);
@ -1041,18 +1039,18 @@ class acp_attachments
if (sizeof($error))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_WARNING' => true,
'WARNING_MSG' => implode('<br />', $error))
);
'WARNING_MSG' => implode('<br />', $error),
));
}
if (sizeof($notify))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_NOTIFY' => true,
'NOTIFY_MSG' => implode('<br />', $notify))
);
'NOTIFY_MSG' => implode('<br />', $notify),
));
}
}

View File

@ -97,7 +97,7 @@ class acp_ban
self::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,
@ -187,7 +187,7 @@ class acp_ban
{
foreach ($ban_length as $ban_id => $length)
{
$template->assign_block_vars('ban_length', array(
phpbb::$template->assign_block_vars('ban_length', array(
'BAN_ID' => (int) $ban_id,
'LENGTH' => $length,
'A_LENGTH' => addslashes($length),
@ -199,7 +199,7 @@ class acp_ban
{
foreach ($ban_reasons as $ban_id => $reason)
{
$template->assign_block_vars('ban_reason', array(
phpbb::$template->assign_block_vars('ban_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
@ -211,7 +211,7 @@ class acp_ban
{
foreach ($ban_give_reasons as $ban_id => $reason)
{
$template->assign_block_vars('ban_give_reason', array(
phpbb::$template->assign_block_vars('ban_give_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
@ -219,11 +219,11 @@ class acp_ban
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_BAN_END_OPTIONS' => $ban_end_options,
'S_BANNED_OPTIONS' => ($banned_options) ? true : false,
'BANNED_OPTIONS' => $banned_options)
);
'BANNED_OPTIONS' => $banned_options,
));
}
}

View File

@ -94,7 +94,7 @@ class acp_bbcodes
case 'edit':
case 'add':
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_BBCODE' => true,
'U_BACK' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&amp;bbcode=$bbcode_id" : ''),
@ -103,15 +103,15 @@ class acp_bbcodes
'BBCODE_MATCH' => $bbcode_match,
'BBCODE_TPL' => $bbcode_tpl,
'BBCODE_HELPLINE' => $bbcode_helpline,
'DISPLAY_ON_POSTING' => $display_on_posting)
);
'DISPLAY_ON_POSTING' => $display_on_posting,
));
foreach (phpbb::$user->lang['tokens'] as $token => $token_explain)
{
$template->assign_block_vars('token', array(
phpbb::$template->assign_block_vars('token', array(
'TOKEN' => '{' . $token . '}',
'EXPLAIN' => $token_explain)
);
'EXPLAIN' => $token_explain,
));
}
return;
@ -269,9 +269,9 @@ class acp_bbcodes
break;
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=add')
);
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=add',
));
$sql = 'SELECT *
FROM ' . BBCODES_TABLE . '
@ -280,11 +280,11 @@ class acp_bbcodes
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('bbcodes', array(
phpbb::$template->assign_block_vars('bbcodes', array(
'BBCODE_TAG' => $row['bbcode_tag'],
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;bbcode=' . $row['bbcode_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;bbcode=' . $row['bbcode_id'])
);
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;bbcode=' . $row['bbcode_id'],
));
}
phpbb::$db->sql_freeresult($result);
}

View File

@ -514,15 +514,15 @@ class acp_board
$this->tpl_name = 'acp_board';
$this->page_title = $display_vars['title'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang[$display_vars['title']],
'L_TITLE_EXPLAIN' => phpbb::$user->lang[$display_vars['title'] . '_EXPLAIN'],
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => implode('<br />', $error),
'U_ACTION' => $this->u_action)
);
'U_ACTION' => $this->u_action,
));
// Output relevant page
foreach ($display_vars['vars'] as $config_key => $vars)
@ -534,10 +534,10 @@ class acp_board
if (strpos($config_key, 'legend') !== false)
{
$template->assign_block_vars('options', array(
phpbb::$template->assign_block_vars('options', array(
'S_LEGEND' => true,
'LEGEND' => (isset(phpbb::$user->lang[$vars])) ? phpbb::$user->lang[$vars] : $vars)
);
'LEGEND' => (isset(phpbb::$user->lang[$vars])) ? phpbb::$user->lang[$vars] : $vars,
));
continue;
}
@ -561,21 +561,20 @@ class acp_board
continue;
}
$template->assign_block_vars('options', array(
phpbb::$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => (isset(phpbb::$user->lang[$vars['lang']])) ? phpbb::$user->lang[$vars['lang']] : $vars['lang'],
'S_EXPLAIN' => $vars['explain'],
'TITLE_EXPLAIN' => $l_explain,
'CONTENT' => $content,
)
);
));
unset($display_vars['vars'][$config_key]);
}
if ($mode == 'auth')
{
$template->assign_var('S_AUTH', true);
phpbb::$template->assign_var('S_AUTH', true);
foreach ($auth_plugins as $method)
{
@ -588,9 +587,9 @@ class acp_board
if ($fields['tpl'])
{
$template->assign_block_vars('auth_tpl', array(
'TPL' => $fields['tpl'])
);
phpbb::$template->assign_block_vars('auth_tpl', array(
'TPL' => $fields['tpl'],
));
}
unset($fields);
}

View File

@ -328,7 +328,7 @@ class acp_bots
$l_title = ($action == 'edit') ? 'EDIT' : 'ADD';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['BOT_' . $l_title],
'U_ACTION' => $this->u_action . "&amp;id=$bot_id&amp;action=$action",
'U_BACK' => $this->u_action,
@ -343,8 +343,7 @@ class acp_bots
'S_STYLE_OPTIONS' => $style_select,
'S_LANG_OPTIONS' => $lang_select,
'S_ERROR' => (sizeof($error)) ? true : false,
)
);
));
return;
@ -358,10 +357,10 @@ class acp_bots
$s_options .= '<option value="' . $value . '">' . phpbb::$user->lang[$lang] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_BOT_OPTIONS' => $s_options)
);
'S_BOT_OPTIONS' => $s_options,
));
$sql = 'SELECT b.bot_id, b.bot_name, b.bot_active, u.user_lastvisit
FROM ' . BOTS_TABLE . ' b, ' . USERS_TABLE . ' u
@ -374,7 +373,7 @@ class acp_bots
$active_lang = (!$row['bot_active']) ? 'BOT_ACTIVATE' : 'BOT_DEACTIVATE';
$active_value = (!$row['bot_active']) ? 'activate' : 'deactivate';
$template->assign_block_vars('bots', array(
phpbb::$template->assign_block_vars('bots', array(
'BOT_NAME' => $row['bot_name'],
'BOT_ID' => $row['bot_id'],
'LAST_VISIT' => ($row['user_lastvisit']) ? phpbb::$user->format_date($row['user_lastvisit']) : phpbb::$user->lang['BOT_NEVER'],
@ -382,8 +381,8 @@ class acp_bots
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=$active_value",
'L_ACTIVATE_DEACTIVATE' => phpbb::$user->lang[$active_lang],
'U_EDIT' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=edit",
'U_DELETE' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=delete")
);
'U_DELETE' => $this->u_action . "&amp;id={$row['bot_id']}&amp;action=delete",
));
}
phpbb::$db->sql_freeresult($result);
}

View File

@ -107,10 +107,10 @@ class acp_captcha
foreach ($config_vars as $config_var => $template_var)
{
$template->assign_var($template_var, request_var($config_var, phpbb::$config[$config_var])) ;
phpbb::$template->assign_var($template_var, request_var($config_var, phpbb::$config[$config_var])) ;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CAPTCHA_PREVIEW' => $demo_captcha->get_demo_template($id),
'CAPTCHA_SELECT' => $captcha_select,
));

View File

@ -33,8 +33,8 @@ class acp_database
$action = request_var('action', '');
$submit = phpbb_request::is_set_post('submit');
$template->assign_vars(array(
'MODE' => $mode
phpbb::$template->assign_vars(array(
'MODE' => $mode,
));
switch ($mode)
@ -175,15 +175,15 @@ class acp_database
{
if (strlen(phpbb::$base_config['table_prefix']) === 0 || stripos($table_name, phpbb::$base_config['table_prefix']) === 0)
{
$template->assign_block_vars('tables', array(
'TABLE' => $table_name
phpbb::$template->assign_block_vars('tables', array(
'TABLE' => $table_name,
));
}
}
unset($tables);
$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=download'
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=download',
));
$available_methods = array('gzip' => 'zlib', 'bzip2' => 'bz2');
@ -195,13 +195,13 @@ class acp_database
continue;
}
$template->assign_block_vars('methods', array(
'TYPE' => $type
phpbb::$template->assign_block_vars('methods', array(
'TYPE' => $type,
));
}
$template->assign_block_vars('methods', array(
'TYPE' => 'text'
phpbb::$template->assign_block_vars('methods', array(
'TYPE' => 'text',
));
break;
}
@ -430,10 +430,10 @@ class acp_database
if ($supported == 'true')
{
$template->assign_block_vars('files', array(
phpbb::$template->assign_block_vars('files', array(
'FILE' => $file,
'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
'SUPPORTED' => $supported
'SUPPORTED' => $supported,
));
}
}
@ -441,8 +441,8 @@ class acp_database
closedir($dh);
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=submit'
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=submit',
));
break;
}

View File

@ -95,10 +95,10 @@ class acp_disallow
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_DISALLOWED_NAMES' => $disallow_select)
);
'S_DISALLOWED_NAMES' => $disallow_select,
));
}
}

View File

@ -241,7 +241,7 @@ class acp_email
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . phpbb::$user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . phpbb::$user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_WARNING' => (sizeof($error)) ? true : false,
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'U_ACTION' => $this->u_action,

View File

@ -360,12 +360,12 @@ class acp_forums
meta_refresh(0, $url);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_PROGRESS_BAR' => $this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}",
'UA_PROGRESS_BAR' => addslashes($this->u_action . "&amp;action=progress_bar&amp;start=$topics_done&amp;total={$row['forum_topics_real']}"),
'S_CONTINUE_SYNC' => true,
'L_PROGRESS_EXPLAIN' => sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']))
);
'L_PROGRESS_EXPLAIN' => sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']),
));
return;
}
@ -374,12 +374,12 @@ class acp_forums
$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;f=$forum_id&amp;action=sync_forum";
meta_refresh(0, $url);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_PROGRESS_BAR' => $this->u_action . '&amp;action=progress_bar',
'UA_PROGRESS_BAR' => addslashes($this->u_action . '&amp;action=progress_bar'),
'S_CONTINUE_SYNC' => true,
'L_PROGRESS_EXPLAIN' => sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']))
);
'L_PROGRESS_EXPLAIN' => sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], 0, $row['forum_topics_real']),
));
return;
@ -404,7 +404,7 @@ class acp_forums
add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']);
phpbb::$acm->destroy_sql(FORUMS_TABLE);
$template->assign_var('L_FORUM_RESYNCED', sprintf(phpbb::$user->lang['FORUM_RESYNCED'], $row['forum_name']));
phpbb::$template->assign_var('L_FORUM_RESYNCED', sprintf(phpbb::$user->lang['FORUM_RESYNCED'], $row['forum_name']));
break;
@ -561,9 +561,9 @@ class acp_forums
if (phpbb::$db->sql_fetchrow($result))
{
$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false))
);
phpbb::$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $forum_id, false, true, false),
));
}
phpbb::$db->sql_freeresult($result);
@ -588,16 +588,16 @@ class acp_forums
if (phpbb::$db->sql_fetchrow($result))
{
$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id)) // , false, true, false???
);
phpbb::$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id), // , false, true, false???
));
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
'S_FORUMS_LIST' => $forums_list)
);
'S_FORUMS_LIST' => $forums_list,
));
}
$s_show_display_on_index = false;
@ -619,7 +619,7 @@ class acp_forums
$errors[] = phpbb::$user->lang['FORUM_PASSWORD_OLD'];
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_FORUM' => true,
'S_ERROR' => (sizeof($errors)) ? true : false,
'S_PARENT_ID' => $this->parent_id,
@ -715,15 +715,15 @@ class acp_forums
if (phpbb::$db->sql_fetchrow($result))
{
$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id, false, true)) // , false, true, false???
);
phpbb::$template->assign_vars(array(
'S_MOVE_FORUM_OPTIONS' => make_forum_select($forum_data['parent_id'], $subforums_id, false, true), // , false, true, false???
));
}
phpbb::$db->sql_freeresult($result);
$parent_id = ($this->parent_id == $forum_id) ? 0 : $this->parent_id;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DELETE_FORUM' => true,
'U_ACTION' => $this->u_action . "&amp;parent_id={$parent_id}&amp;action=delete&amp;f=$forum_id",
'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
@ -734,8 +734,8 @@ class acp_forums
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
'S_FORUMS_LIST' => $forums_list,
'S_ERROR' => (sizeof($errors)) ? true : false,
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '')
);
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
));
return;
break;
@ -769,7 +769,7 @@ class acp_forums
if ($action == 'sync' || $action == 'sync_forum')
{
$template->assign_var('S_RESYNCED', true);
phpbb::$template->assign_var('S_RESYNCED', true);
}
$sql = 'SELECT *
@ -808,7 +808,7 @@ class acp_forums
$forum_title .= $row['forum_name'];
$forum_title .= ($forum_type != FORUM_LINK) ? '</a>' : '';
$template->assign_block_vars('forums', array(
phpbb::$template->assign_block_vars('forums', array(
'FOLDER_IMAGE' => $folder_image,
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . PHPBB_ROOT_PATH . $row['forum_image'] . '" alt="" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? PHPBB_ROOT_PATH . $row['forum_image'] : '',
@ -825,8 +825,8 @@ class acp_forums
'U_MOVE_DOWN' => $url . '&amp;action=move_down',
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
'U_SYNC' => $url . '&amp;action=sync')
);
'U_SYNC' => $url . '&amp;action=sync',
));
}
while ($row = phpbb::$db->sql_fetchrow($result));
}
@ -836,17 +836,17 @@ class acp_forums
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;f=' . $row['forum_id'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_NO_FORUMS' => true,
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
'U_SYNC' => $url . '&amp;action=sync')
);
'U_SYNC' => $url . '&amp;action=sync',
));
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
'NAVIGATION' => $navigation,
'FORUM_BOX' => $forum_box,
@ -1897,14 +1897,14 @@ class acp_forums
{
page_header(phpbb::$user->lang['SYNC_IN_PROGRESS']);
$template->set_filenames(array(
'body' => 'progress_bar.html')
);
phpbb::$template->set_filenames(array(
'body' => 'progress_bar.html',
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_PROGRESS' => phpbb::$user->lang['SYNC_IN_PROGRESS'],
'L_PROGRESS_EXPLAIN' => ($start && $total) ? sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $start, $total) : phpbb::$user->lang['SYNC_IN_PROGRESS'])
);
'L_PROGRESS_EXPLAIN' => ($start && $total) ? sprintf(phpbb::$user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $start, $total) : phpbb::$user->lang['SYNC_IN_PROGRESS'],
));
page_footer();
}

View File

@ -540,7 +540,7 @@ class acp_groups
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'S_ADD_GROUP' => ($action == 'add') ? true : false,
'S_GROUP_PERM' => ($action == 'add' && phpbb::$acl->acl_get('a_authgroups') && phpbb::$acl->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
@ -563,7 +563,6 @@ class acp_groups
'GROUP_MAX_RECIPIENTS' => (isset($group_row['group_max_recipients'])) ? $group_row['group_max_recipients'] : 0,
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'],
'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'],
'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'],
@ -591,8 +590,7 @@ class acp_groups
'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(phpbb::$user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], round(phpbb::$config['avatar_filesize'] / 1024)),
)
);
));
return;
break;
@ -617,15 +615,15 @@ class acp_groups
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('leader', array(
phpbb::$template->assign_block_vars('leader', array(
'U_USER_EDIT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=users&amp;action=edit&amp;u={$row['user_id']}"),
'USERNAME' => $row['username'],
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
'JOINED' => ($row['user_regdate']) ? phpbb::$user->format_date($row['user_regdate']) : ' - ',
'USER_POSTS' => $row['user_posts'],
'USER_ID' => $row['user_id'])
);
'USER_ID' => $row['user_id'],
));
}
phpbb::$db->sql_freeresult($result);
@ -646,7 +644,7 @@ class acp_groups
$s_action_options .= '<option value="' . $option . '">' . phpbb::$user->lang['GROUP_' . $lang] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_LIST' => true,
'S_GROUP_SPECIAL' => ($group_row['group_type'] == GROUP_SPECIAL) ? true : false,
'S_ACTION_OPTIONS' => $s_action_options,
@ -676,22 +674,22 @@ class acp_groups
{
if ($row['user_pending'] && !$pending)
{
$template->assign_block_vars('member', array(
'S_PENDING' => true)
);
phpbb::$template->assign_block_vars('member', array(
'S_PENDING' => true,
));
$pending = true;
}
$template->assign_block_vars('member', array(
phpbb::$template->assign_block_vars('member', array(
'U_USER_EDIT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=users&amp;action=edit&amp;u={$row['user_id']}"),
'USERNAME' => $row['username'],
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
'JOINED' => ($row['user_regdate']) ? phpbb::$user->format_date($row['user_regdate']) : ' - ',
'USER_POSTS' => $row['user_posts'],
'USER_ID' => $row['user_id'])
);
'USER_ID' => $row['user_id'],
));
}
phpbb::$db->sql_freeresult($result);
@ -699,10 +697,10 @@ class acp_groups
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_GROUP_ADD' => (phpbb::$acl->acl_get('a_groupadd')) ? true : false)
);
'S_GROUP_ADD' => (phpbb::$acl->acl_get('a_groupadd')) ? true : false,
));
// Get us all the groups
$sql = 'SELECT g.group_id, g.group_name, g.group_type
@ -745,16 +743,16 @@ class acp_groups
{
if ($type == 'special')
{
$template->assign_block_vars('groups', array(
'S_SPECIAL' => true)
);
phpbb::$template->assign_block_vars('groups', array(
'S_SPECIAL' => true,
));
}
foreach ($row_ary as $group_id => $row)
{
$group_name = (!empty(phpbb::$user->lang['G_' . $row['group_name']]))? phpbb::$user->lang['G_' . $row['group_name']] : $row['group_name'];
$template->assign_block_vars('groups', array(
phpbb::$template->assign_block_vars('groups', array(
'U_LIST' => "{$this->u_action}&amp;action=list&amp;g=$group_id",
'U_EDIT' => "{$this->u_action}&amp;action=edit&amp;g=$group_id",
'U_DELETE' => (phpbb::$acl->acl_get('a_groupdel')) ? "{$this->u_action}&amp;action=delete&amp;g=$group_id" : '',
@ -763,8 +761,7 @@ class acp_groups
'GROUP_NAME' => $group_name,
'TOTAL_MEMBERS' => $row['total_members'],
)
);
));
}
}
}

View File

@ -154,7 +154,7 @@ class acp_icons
}
$smiley_options .= '<option value="' . $row['smiley_url'] . '"' . (($selected) ? ' selected="selected"' : '') . '>' . $row['smiley_url'] . '</option>';
$template->assign_block_vars('smile', array(
phpbb::$template->assign_block_vars('smile', array(
'SMILEY_URL' => addslashes($row['smiley_url']),
'CODE' => addslashes($row['code']),
'EMOTION' => addslashes($row['emotion']),
@ -232,7 +232,7 @@ class acp_icons
$colspan += ($icon_id) ? 1 : 0;
$colspan += ($action == 'add') ? 2 : 0;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'S_SMILIES' => ($mode == 'smilies') ? true : false,
'S_ADD' => ($action == 'add') ? true : false,
@ -260,7 +260,7 @@ class acp_icons
foreach ($data as $img => $img_row)
{
$template->assign_block_vars('items', array(
phpbb::$template->assign_block_vars('items', array(
'IMG' => $img,
'A_IMG' => addslashes($img),
'IMG_SRC' => PHPBB_ROOT_PATH . $img_path . '/' . $img,
@ -279,7 +279,7 @@ class acp_icons
// Ok, another row for adding an addition code for a pre-existing image...
if ($action == 'add' && $mode == 'smilies' && sizeof($smilies))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ADD_CODE' => true,
'S_IMG_OPTIONS' => $smiley_options,
@ -619,7 +619,7 @@ class acp_icons
$pak_options .= '<option value="' . $pak . '">' . htmlspecialchars($pak) . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CHOOSE_PAK' => true,
'S_PAK_OPTIONS' => $pak_options,
@ -632,8 +632,7 @@ class acp_icons
'U_BACK' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;action=import',
)
);
));
}
break;
@ -642,13 +641,12 @@ class acp_icons
$this->page_title = 'EXPORT_' . $lang;
$this->tpl_name = 'message_body';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MESSAGE_TITLE' => phpbb::$user->lang['EXPORT_' . $lang],
'MESSAGE_TEXT' => sprintf(phpbb::$user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&amp;action=send">', '</a>'),
'S_USER_NOTICE' => true,
)
);
));
return;
@ -808,7 +806,7 @@ class acp_icons
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['ACP_' . $lang],
'L_EXPLAIN' => phpbb::$user->lang['ACP_' . $lang . '_EXPLAIN'],
'L_IMPORT' => phpbb::$user->lang['IMPORT_' . $lang],
@ -825,8 +823,7 @@ class acp_icons
'U_ACTION' => $this->u_action,
'U_IMPORT' => $this->u_action . '&amp;action=import',
'U_EXPORT' => $this->u_action . '&amp;action=export',
)
);
));
$spacer = false;
@ -839,7 +836,7 @@ class acp_icons
{
$alt_text = ($mode == 'smilies') ? $row['code'] : '';
$template->assign_block_vars('items', array(
phpbb::$template->assign_block_vars('items', array(
'S_SPACER' => (!$spacer && !$row['display_on_posting']) ? true : false,
'ALT_TEXT' => $alt_text,
'IMG_SRC' => PHPBB_ROOT_PATH . $img_path . '/' . $row[$fields . '_url'],
@ -850,8 +847,8 @@ class acp_icons
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row[$fields . '_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row[$fields . '_id'],
'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;id=' . $row[$fields . '_id'],
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'])
);
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;id=' . $row[$fields . '_id'],
));
if (!$spacer && !$row['display_on_posting'])
{

View File

@ -218,15 +218,15 @@ class acp_inactive
foreach ($inactive as $row)
{
$template->assign_block_vars('inactive', array(
phpbb::$template->assign_block_vars('inactive', array(
'INACTIVE_DATE' => phpbb::$user->format_date($row['user_inactive_time']),
'JOINED' => phpbb::$user->format_date($row['user_regdate']),
'LAST_VISIT' => (!$row['user_lastvisit']) ? ' - ' : phpbb::$user->format_date($row['user_lastvisit']),
'REASON' => $row['inactive_reason'],
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_USER_ADMIN' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=users&amp;mode=overview&amp;u={$row['user_id']}"))
);
'U_USER_ADMIN' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=users&amp;mode=overview&amp;u={$row['user_id']}"),
));
}
$option_ary = array('activate' => 'ACTIVATE', 'delete' => 'DELETE');
@ -235,7 +235,7 @@ class acp_inactive
$option_ary += array('remind' => 'REMIND');
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_INACTIVE_USERS' => true,
'S_INACTIVE_OPTIONS' => build_select($option_ary),

View File

@ -108,7 +108,7 @@ class acp_jabber
trigger_error($message . adm_back_link($this->u_action));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf(phpbb::$user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),

View File

@ -124,11 +124,11 @@ class acp_language
foreach ($requested_data as $data => $default)
{
$default_value = request_var($data, '');
$template->assign_block_vars('data', array(
phpbb::$template->assign_block_vars('data', array(
'DATA' => $data,
'NAME' => phpbb::$user->lang[strtoupper($method . '_' . $data)],
'EXPLAIN' => phpbb::$user->lang[strtoupper($method . '_' . $data) . '_EXPLAIN'],
'DEFAULT' => (empty($default_value)) ? $default : $default_value
'DEFAULT' => (empty($default_value)) ? $default : $default_value,
));
}
@ -144,7 +144,7 @@ class acp_language
*/
$hidden_data .= build_hidden_fields(array('entry' => $_POST['entry']), true, STRIP);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_UPLOAD' => true,
'NAME' => $method,
'U_ACTION' => $this->u_action . "&amp;id=$lang_id&amp;action=upload_data",
@ -152,7 +152,7 @@ class acp_language
'HIDDEN' => $hidden_data,
'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false,
'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection !== true) ? true : false
'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection !== true) ? true : false,
));
break;
@ -517,12 +517,12 @@ class acp_language
foreach ($methods as $method)
{
$template->assign_block_vars('buttons', array(
'VALUE' => $method
phpbb::$template->assign_block_vars('buttons', array(
'VALUE' => $method,
));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DETAILS' => true,
'U_ACTION' => $this->u_action . "&amp;action=details&amp;id=$lang_id",
'U_BACK' => $this->u_action,
@ -530,9 +530,8 @@ class acp_language
'LANG_ENGLISH_NAME' => $lang_entries['lang_english_name'],
'LANG_ISO' => $lang_entries['lang_iso'],
'LANG_AUTHOR' => $lang_entries['lang_author'],
'ALLOW_UPLOAD' => sizeof($methods)
)
);
'ALLOW_UPLOAD' => sizeof($methods),
));
// If current lang is different from the default lang, then first try to grab missing/additional vars
if ($lang_iso != phpbb::$config['default_lang'])
@ -605,20 +604,20 @@ class acp_language
if (sizeof($missing_files))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_MISSING_FILES' => true,
'L_MISSING_FILES' => sprintf(phpbb::$user->lang['THOSE_MISSING_LANG_FILES'], $lang_entries['lang_local_name']),
'MISSING_FILES' => implode('<br />', $missing_files))
);
'MISSING_FILES' => implode('<br />', $missing_files),
));
}
if ($is_missing_var)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_MISSING_VARS' => true,
'L_MISSING_VARS_EXPLAIN' => sprintf(phpbb::$user->lang['THOSE_MISSING_LANG_VARIABLES'], $lang_entries['lang_local_name']),
'U_MISSING_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id")
);
'U_MISSING_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id",
));
foreach ($missing_vars as $file => $vars)
{
@ -627,11 +626,11 @@ class acp_language
continue;
}
$template->assign_block_vars('missing', array(
phpbb::$template->assign_block_vars('missing', array(
'FILE' => $file,
'TPL' => $this->print_language_entries($vars, '', false),
'KEY' => (strpos($file, '/') === false) ? '|' . $file : str_replace('/', '|', $file))
);
'KEY' => (strpos($file, '/') === false) ? '|' . $file : str_replace('/', '|', $file),
));
}
}
}
@ -722,14 +721,13 @@ class acp_language
}
// Normal language pack entries
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ENTRY_ACTION' => $this->u_action . "&amp;action=details&amp;id=$lang_id#entries",
'S_EMAIL_FILE' => $is_email_file,
'S_FROM_STORE' => $file_from_store,
'S_LANG_OPTIONS' => $s_lang_options,
'PRINT_MESSAGE' => $print_message,
)
);
));
if (!$is_email_file)
{
@ -743,14 +741,14 @@ class acp_language
$tpl .= $this->print_language_entries($lang);
$template->assign_var('TPL', $tpl);
phpbb::$template->assign_var('TPL', $tpl);
unset($tpl);
}
else
{
$template->assign_vars(array(
'LANG' => $lang)
);
phpbb::$template->assign_vars(array(
'LANG' => $lang,
));
unset($lang);
}
@ -991,12 +989,12 @@ class acp_language
$radio_buttons .= '<label><input type="radio"' . ((!$radio_buttons) ? ' id="use_method"' : '') . ' class="radio" value="' . $method . '" name="use_method" /> ' . $method . '</label>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_METHOD' => true,
'U_BACK' => $this->u_action,
'U_ACTION' => $this->u_action . "&amp;action=$action&amp;id=$lang_id",
'RADIO_BUTTONS' => $radio_buttons)
);
'RADIO_BUTTONS' => $radio_buttons,
));
return;
}
@ -1098,7 +1096,7 @@ class acp_language
$installed[] = $row['lang_iso'];
$tagstyle = ($row['lang_iso'] == phpbb::$config['default_lang']) ? '*' : '';
$template->assign_block_vars('lang', array(
phpbb::$template->assign_block_vars('lang', array(
'U_DETAILS' => $this->u_action . "&amp;action=details&amp;id={$row['lang_id']}",
'U_DOWNLOAD' => $this->u_action . "&amp;action=download&amp;id={$row['lang_id']}",
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;id={$row['lang_id']}",
@ -1147,12 +1145,12 @@ class acp_language
{
foreach ($new_ary as $iso => $lang_ary)
{
$template->assign_block_vars('notinst', array(
phpbb::$template->assign_block_vars('notinst', array(
'ISO' => htmlspecialchars($lang_ary['iso']),
'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'),
'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'),
'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']))
);
'U_INSTALL' => $this->u_action . '&amp;action=install&amp;iso=' . urlencode($lang_ary['iso']),
));
}
}

View File

@ -111,10 +111,10 @@ class acp_logs
{
$forum_box = '<option value="0">' . phpbb::$user->lang['ALL_FORUMS'] . '</option>' . make_forum_select($forum_id);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_FORUMS' => true,
'S_FORUM_BOX' => $forum_box)
);
'S_FORUM_BOX' => $forum_box,
));
}
// Grab log data
@ -122,7 +122,7 @@ class acp_logs
$log_count = 0;
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(
phpbb::$template->assign_vars(array(
'L_TITLE' => $l_title,
'L_EXPLAIN' => $l_title_explain,
'U_ACTION' => $this->u_action,
@ -134,8 +134,7 @@ class acp_logs
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'),
)
);
));
foreach ($log_data as $row)
{
@ -150,7 +149,7 @@ class acp_logs
}
}
$template->assign_block_vars('log', array(
phpbb::$template->assign_block_vars('log', array(
'USERNAME' => $row['username_full'],
'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username_full'] : '',
@ -159,8 +158,7 @@ class acp_logs
'ACTION' => $row['action'],
'DATA' => (sizeof($data)) ? implode(' | ', $data) : '',
'ID' => $row['id'],
)
);
));
}
}
}

View File

@ -323,7 +323,7 @@ class acp_modules
// Name options
$s_name_options .= '<option value="' . $option . '"' . (($option == $module_data['module_basename']) ? ' selected="selected"' : '') . '>' . phpbb::$user->lang($values['title']) . ' [' . $this->module_class . '_' . $option . ']</option>';
$template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));
phpbb::$template->assign_block_vars('m_names', array('NAME' => $option, 'A_NAME' => addslashes($option)));
// Build module modes
foreach ($values['modes'] as $m_mode => $m_values)
@ -333,18 +333,18 @@ class acp_modules
$s_mode_options .= '<option value="' . $m_mode . '"' . (($m_mode == $module_data['module_mode']) ? ' selected="selected"' : '') . '>' . phpbb::$user->lang($m_values['title']) . '</option>';
}
$template->assign_block_vars('m_names.modes', array(
phpbb::$template->assign_block_vars('m_names.modes', array(
'OPTION' => $m_mode,
'VALUE' => phpbb::$user->lang($m_values['title']),
'A_OPTION' => addslashes($m_mode),
'A_VALUE' => addslashes(phpbb::$user->lang($m_values['title'])))
);
'A_VALUE' => addslashes(phpbb::$user->lang($m_values['title'])),
));
}
}
$s_cat_option = '<option value="0"' . (($module_data['parent_id'] == 0) ? ' selected="selected"' : '') . '>' . phpbb::$user->lang['NO_PARENT'] . '</option>';
$template->assign_vars(array_merge(array(
phpbb::$template->assign_vars(array_merge(array(
'S_EDIT_MODULE' => true,
'S_IS_CAT' => $is_cat,
'S_CAT_OPTIONS' => $s_cat_option . $this->make_module_select($module_data['parent_id'], ($action == 'edit') ? $module_row['module_id'] : false, false, false, false, true),
@ -365,10 +365,10 @@ class acp_modules
if (sizeof($errors))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => implode('<br />', $errors))
);
'ERROR_MSG' => implode('<br />', $errors),
));
}
return;
@ -379,10 +379,10 @@ class acp_modules
// Default management page
if (sizeof($errors))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ERROR' => true,
'ERROR_MSG' => implode('<br />', $errors))
);
'ERROR_MSG' => implode('<br />', $errors),
));
}
if (!$this->parent_id)
@ -437,7 +437,7 @@ class acp_modules
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
$template->assign_block_vars('modules', array(
phpbb::$template->assign_block_vars('modules', array(
'MODULE_IMAGE' => $module_image,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
@ -452,8 +452,8 @@ class acp_modules
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
'U_ENABLE' => $url . '&amp;action=enable',
'U_DISABLE' => $url . '&amp;action=disable')
);
'U_DISABLE' => $url . '&amp;action=disable',
));
}
while ($row = phpbb::$db->sql_fetchrow($result));
}
@ -463,7 +463,7 @@ class acp_modules
$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;m=' . $row['module_id'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_NO_MODULES' => true,
'MODULE_TITLE' => $langname,
'MODULE_ENABLED' => ($row['module_enabled']) ? true : false,
@ -472,8 +472,8 @@ class acp_modules
'U_EDIT' => $url . '&amp;action=edit',
'U_DELETE' => $url . '&amp;action=delete',
'U_ENABLE' => $url . '&amp;action=enable',
'U_DISABLE' => $url . '&amp;action=disable')
);
'U_DISABLE' => $url . '&amp;action=disable',
));
}
phpbb::$db->sql_freeresult($result);
@ -496,15 +496,14 @@ class acp_modules
$s_install_options .= '</optgroup>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_SEL_ACTION' => $this->u_action,
'U_ACTION' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
'NAVIGATION' => $navigation,
'MODULE_BOX' => $module_box,
'PARENT_ID' => $this->parent_id,
'S_INSTALL_OPTIONS' => $s_install_options,
)
);
));
}
/**

View File

@ -70,10 +70,10 @@ class acp_permission_roles
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang[$this->page_title],
'L_EXPLAIN' => phpbb::$user->lang[$this->page_title . '_EXPLAIN'])
);
'L_EXPLAIN' => phpbb::$user->lang[$this->page_title . '_EXPLAIN'],
));
// Take action... admin submitted something
if ($submit || $action == 'remove')
@ -303,7 +303,7 @@ class acp_permission_roles
trigger_error(phpbb::$user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'U_ACTION' => $this->u_action . "&amp;action={$action}&amp;role_id={$role_id}",
@ -312,8 +312,7 @@ class acp_permission_roles
'ROLE_NAME' => $role_row['role_name'],
'ROLE_DESCRIPTION' => $role_row['role_description'],
'L_ACL_TYPE' => phpbb::$user->lang['ACL_TYPE_' . strtoupper($permission_type)],
)
);
));
// We need to fill the auth options array with ACL_NO options ;)
$sql = 'SELECT auth_option_id, auth_option
@ -347,10 +346,10 @@ class acp_permission_roles
{
$role_name = (!empty(phpbb::$user->lang[$role_row['role_name']])) ? phpbb::$user->lang[$role_row['role_name']] : $role_row['role_name'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DISPLAY_ROLE_MASK' => true,
'L_ROLE_ASSIGNED_TO' => sprintf(phpbb::$user->lang['ROLE_ASSIGNED_TO'], $role_name))
);
'L_ROLE_ASSIGNED_TO' => sprintf(phpbb::$user->lang['ROLE_ASSIGNED_TO'], $role_name),
));
$auth_admin->display_role_mask($hold_ary);
}
@ -411,7 +410,7 @@ class acp_permission_roles
{
$role_name = (!empty(phpbb::$user->lang[$row['role_name']])) ? phpbb::$user->lang[$row['role_name']] : $row['role_name'];
$template->assign_block_vars('roles', array(
phpbb::$template->assign_block_vars('roles', array(
'ROLE_NAME' => $role_name,
'ROLE_DESCRIPTION' => (!empty(phpbb::$user->lang[$row['role_description']])) ? phpbb::$user->lang[$row['role_description']] : nl2br($row['role_description']),
@ -419,29 +418,29 @@ class acp_permission_roles
'U_REMOVE' => $this->u_action . '&amp;action=remove&amp;role_id=' . $row['role_id'],
'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['role_order'],
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['role_order'],
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to')
);
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&amp;display_item=' . $row['role_id'] . '#assigned_to',
));
$s_role_options .= '<option value="' . $row['role_id'] . '">' . $role_name . '</option>';
if ($display_item == $row['role_id'])
{
$template->assign_vars(array(
'L_ROLE_ASSIGNED_TO' => sprintf(phpbb::$user->lang['ROLE_ASSIGNED_TO'], $role_name))
);
phpbb::$template->assign_vars(array(
'L_ROLE_ASSIGNED_TO' => sprintf(phpbb::$user->lang['ROLE_ASSIGNED_TO'], $role_name),
));
}
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
'S_ROLE_OPTIONS' => $s_role_options)
);
phpbb::$template->assign_vars(array(
'S_ROLE_OPTIONS' => $s_role_options,
));
if ($display_item)
{
$template->assign_vars(array(
'S_DISPLAY_ROLE_MASK' => true)
);
phpbb::$template->assign_vars(array(
'S_DISPLAY_ROLE_MASK' => true,
));
$hold_ary = $auth_admin->get_role_mask($display_item);
$auth_admin->display_role_mask($hold_ary);
@ -462,29 +461,29 @@ class acp_permission_roles
$content_array = $content_array[0];
$template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
phpbb::$template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
// Assign to template
foreach ($content_array as $cat => $cat_array)
{
$template->assign_block_vars('auth', array(
phpbb::$template->assign_block_vars('auth', array(
'CAT_NAME' => phpbb::$user->lang['permission_cat'][$cat],
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false)
);
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
));
foreach ($cat_array['permissions'] as $permission => $allowed)
{
$template->assign_block_vars('auth.mask', array(
phpbb::$template->assign_block_vars('auth.mask', array(
'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false,
'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false,
'S_NO' => ($allowed == phpbb::ACL_NO) ? true : false,
'FIELD_NAME' => $permission,
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'])
);
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'],
));
}
}
}

View File

@ -144,9 +144,9 @@ class acp_permissions
{
$this->page_title = 'ACP_PERMISSIONS';
$template->assign_vars(array(
'S_INTRO' => true)
);
phpbb::$template->assign_vars(array(
'S_INTRO' => true,
));
return;
}
@ -201,10 +201,10 @@ class acp_permissions
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang[$this->page_title],
'L_EXPLAIN' => phpbb::$user->lang[$this->page_title . '_EXPLAIN'])
);
'L_EXPLAIN' => phpbb::$user->lang[$this->page_title . '_EXPLAIN'],
));
// Get permission type
$permission_type = request_var('type', $this->permission_dropdown[0]);
@ -304,10 +304,10 @@ class acp_permissions
continue 2;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_FORUM' => true,
'S_FORUM_OPTIONS' => make_forum_select(false, false, true, false, false))
);
'S_FORUM_OPTIONS' => make_forum_select(false, false, true, false, false),
));
break;
@ -331,13 +331,13 @@ class acp_permissions
// Build subforum options
$s_subforum_options = $this->build_subforum_options($forum_list);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_FORUM' => true,
'S_FORUM_OPTIONS' => $s_forum_options,
'S_SUBFORUM_OPTIONS' => $s_subforum_options,
'S_FORUM_ALL' => true,
'S_FORUM_MULTIPLE' => true)
);
'S_FORUM_MULTIPLE' => true,
));
break;
@ -349,7 +349,7 @@ class acp_permissions
continue 2;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_USER' => true,
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&amp;form=select_victim&amp;field=username&amp;select_single=true'),
));
@ -364,10 +364,10 @@ class acp_permissions
continue 2;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_GROUP' => true,
'S_GROUP_OPTIONS' => group_select_options(false, false, ((phpbb::$user->is_founder) ? false : 0)))
);
'S_GROUP_OPTIONS' => group_select_options(false, false, ((phpbb::$user->is_founder) ? false : 0)),
));
break;
@ -407,7 +407,7 @@ class acp_permissions
continue 2;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false,
'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false,
'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'],
@ -423,7 +423,7 @@ class acp_permissions
// If there are more than 5 forums selected the admin is not able to select all users/groups too.
// We need to see if the number of forums can be increased or need to be decreased.
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'ANONYMOUS_USER_ID' => ANONYMOUS,
@ -431,8 +431,8 @@ class acp_permissions
'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true,
'S_CAN_SELECT_USER' => (phpbb::$acl->acl_get('a_authusers')) ? true : false,
'S_CAN_SELECT_GROUP' => (phpbb::$acl->acl_get('a_authgroups')) ? true : false,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
// Let the forum names being displayed
if (sizeof($forum_id))
@ -450,10 +450,10 @@ class acp_permissions
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FORUM_NAMES' => (sizeof($forum_names)) ? true : false,
'FORUM_NAMES' => implode(', ', $forum_names))
);
'FORUM_NAMES' => implode(', ', $forum_names),
));
}
return;
@ -465,28 +465,28 @@ class acp_permissions
trigger_error(phpbb::$user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false,
'L_PERMISSION_TYPE' => phpbb::$user->lang['ACL_TYPE_' . strtoupper($permission_type)],
'U_ACTION' => $this->u_action,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
if (strpos($mode, 'setting_') === 0)
{
$template->assign_vars(array(
'S_SETTING_PERMISSIONS' => true)
);
phpbb::$template->assign_vars(array(
'S_SETTING_PERMISSIONS' => true,
));
$hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, phpbb::ACL_NO);
$auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
}
else
{
$template->assign_vars(array(
'S_VIEWING_PERMISSIONS' => true)
);
phpbb::$template->assign_vars(array(
'S_VIEWING_PERMISSIONS' => true,
));
$hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, phpbb::ACL_NEVER);
$auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
@ -899,23 +899,23 @@ class acp_permissions
$back = request_var('back', 0);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'],
'PERMISSION_USERNAME' => $userdata['username'],
'FORUM_NAME' => $forum_name,
'S_GLOBAL_TRACE' => ($forum_id) ? false : true,
'U_BACK' => ($back) ? build_url(array('f', 'back')) . "&amp;f=$back" : '')
);
'U_BACK' => ($back) ? build_url(array('f', 'back')) . "&amp;f=$back" : '',
));
$template->assign_block_vars('trace', array(
phpbb::$template->assign_block_vars('trace', array(
'WHO' => phpbb::$user->lang['DEFAULT'],
'INFORMATION' => phpbb::$user->lang['TRACE_DEFAULT'],
'S_SETTING_NO' => true,
'S_TOTAL_NO' => true)
);
'S_TOTAL_NO' => true,
));
$sql = 'SELECT DISTINCT g.group_name, g.group_id, g.group_type
FROM ' . GROUPS_TABLE . ' g
@ -968,7 +968,7 @@ class acp_permissions
break;
}
$template->assign_block_vars('trace', array(
phpbb::$template->assign_block_vars('trace', array(
'WHO' => $row['group_name'],
'INFORMATION' => $information,
@ -977,8 +977,8 @@ class acp_permissions
'S_SETTING_NEVER' => ($row['auth_setting'] == phpbb::ACL_NEVER) ? true : false,
'S_TOTAL_NO' => ($total == phpbb::ACL_NO) ? true : false,
'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false,
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false)
);
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false,
));
}
}
@ -1004,7 +1004,7 @@ class acp_permissions
break;
}
$template->assign_block_vars('trace', array(
phpbb::$template->assign_block_vars('trace', array(
'WHO' => $userdata['username'],
'INFORMATION' => $information,
@ -1013,8 +1013,8 @@ class acp_permissions
'S_SETTING_NEVER' => ($auth_setting == phpbb::ACL_NEVER) ? true : false,
'S_TOTAL_NO' => false,
'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false,
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false)
);
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false,
));
if ($forum_id != 0 && isset(phpbb::$acl->acl_options['global'][$permission]))
{
@ -1042,7 +1042,7 @@ class acp_permissions
// If there is no auth information we do not need to worry the user by showing non-relevant data.
if ($auth_setting)
{
$template->assign_block_vars('trace', array(
phpbb::$template->assign_block_vars('trace', array(
'WHO' => sprintf(phpbb::$user->lang['TRACE_GLOBAL_SETTING'], $userdata['username']),
'INFORMATION' => sprintf($information, '<a href="' . $this->u_action . "&amp;u=$user_id&amp;f=0&amp;auth=$permission&amp;back=$forum_id\">", '</a>'),
@ -1051,15 +1051,15 @@ class acp_permissions
'S_SETTING_NEVER' => !$auth_setting,
'S_TOTAL_NO' => false,
'S_TOTAL_YES' => ($total == phpbb::ACL_YES) ? true : false,
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false)
);
'S_TOTAL_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false,
));
}
}
// Take founder status into account, overwriting the default values
if ($userdata['user_type'] == phpbb::USER_FOUNDER && strpos($permission, 'a_') === 0)
{
$template->assign_block_vars('trace', array(
phpbb::$template->assign_block_vars('trace', array(
'WHO' => $userdata['username'],
'INFORMATION' => phpbb::$user->lang['TRACE_USER_FOUNDER'],
@ -1068,14 +1068,14 @@ class acp_permissions
'S_SETTING_NEVER' => ($auth_setting == phpbb::ACL_NEVER) ? true : false,
'S_TOTAL_NO' => false,
'S_TOTAL_YES' => true,
'S_TOTAL_NEVER' => false)
);
'S_TOTAL_NEVER' => false,
));
$total = phpbb::ACL_YES;
}
// Total value...
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_RESULT_NO' => ($total == phpbb::ACL_NO) ? true : false,
'S_RESULT_YES' => ($total == phpbb::ACL_YES) ? true : false,
'S_RESULT_NEVER' => ($total == phpbb::ACL_NEVER) ? true : false,

View File

@ -74,7 +74,7 @@ class acp_php_info
preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output);
$output = (!empty($output[1][0])) ? $output[1][0] : $orig_output;
$template->assign_var('PHPINFO', $output);
phpbb::$template->assign_var('PHPINFO', $output);
}
}

View File

@ -713,7 +713,7 @@ class acp_profile
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'S_EDIT_MODE' => ($action == 'edit') ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
@ -722,8 +722,8 @@ class acp_profile
'L_EXPLAIN' => phpbb::$user->lang['STEP_' . $step . '_EXPLAIN_' . strtoupper($action)],
'U_ACTION' => $this->u_action . "&amp;action=$action&amp;step=$step",
'U_BACK' => $this->u_action)
);
'U_BACK' => $this->u_action,
));
// Now go through the steps
switch ($step)
@ -732,7 +732,7 @@ class acp_profile
case 1:
// Build common create options
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_STEP_ONE' => true,
'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false,
'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false,
@ -743,19 +743,19 @@ class acp_profile
'FIELD_TYPE' => phpbb::$user->lang['FIELD_' . strtoupper(custom_profile::$profile_types[$field_type])],
'FIELD_IDENT' => $cp->vars['field_ident'],
'LANG_NAME' => $cp->vars['lang_name'],
'LANG_EXPLAIN' => $cp->vars['lang_explain'])
);
'LANG_EXPLAIN' => $cp->vars['lang_explain'],
));
// String and Text needs to set default values here...
if ($field_type == FIELD_STRING || $field_type == FIELD_TEXT)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_TEXT' => ($field_type == FIELD_TEXT) ? true : false,
'S_STRING' => ($field_type == FIELD_STRING) ? true : false,
'L_DEFAULT_VALUE_EXPLAIN' => phpbb::$user->lang[strtoupper(custom_profile::$profile_types[$field_type]) . '_DEFAULT_VALUE_EXPLAIN'],
'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'])
);
'LANG_DEFAULT_VALUE' => $cp->vars['lang_default_value'],
));
}
if ($field_type == FIELD_BOOL || $field_type == FIELD_DROPDOWN)
@ -776,25 +776,25 @@ class acp_profile
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_BOOL' => ($field_type == FIELD_BOOL) ? true : false,
'S_DROPDOWN' => ($field_type == FIELD_DROPDOWN) ? true : false,
'L_LANG_OPTIONS_EXPLAIN' => phpbb::$user->lang[strtoupper(custom_profile::$profile_types[$field_type]) . '_ENTRIES_EXPLAIN'],
'LANG_OPTIONS' => ($field_type == FIELD_DROPDOWN) ? implode("\n", $cp->vars['lang_options']) : '',
'FIRST_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][0] : '',
'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '')
);
'SECOND_LANG_OPTION' => ($field_type == FIELD_BOOL) ? $cp->vars['lang_options'][1] : '',
));
}
break;
case 2:
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_STEP_TWO' => true,
'L_NEXT_STEP' => (sizeof($this->lang_defs['iso']) == 1) ? phpbb::$user->lang['SAVE'] : phpbb::$user->lang['PROFILE_LANG_OPTIONS'])
);
'L_NEXT_STEP' => (sizeof($this->lang_defs['iso']) == 1) ? phpbb::$user->lang['SAVE'] : phpbb::$user->lang['PROFILE_LANG_OPTIONS'],
));
// Build options based on profile type
$function = 'get_' . custom_profile::$profile_types[$field_type] . '_options';
@ -802,7 +802,7 @@ class acp_profile
foreach ($options as $num => $option_ary)
{
$template->assign_block_vars('option', $option_ary);
phpbb::$template->assign_block_vars('option', $option_ary);
}
break;
@ -810,31 +810,31 @@ class acp_profile
// Define remaining language variables
case 3:
$template->assign_var('S_STEP_THREE', true);
phpbb::$template->assign_var('S_STEP_THREE', true);
$options = $this->build_language_options($cp, $field_type, $action);
foreach ($options as $lang_id => $lang_ary)
{
$template->assign_block_vars('options', array(
'LANGUAGE' => sprintf(phpbb::$user->lang[(($lang_id == $this->edit_lang_id) ? 'DEFAULT_' : '') . 'ISO_LANGUAGE'], $lang_ary['lang_iso']))
);
phpbb::$template->assign_block_vars('options', array(
'LANGUAGE' => sprintf(phpbb::$user->lang[(($lang_id == $this->edit_lang_id) ? 'DEFAULT_' : '') . 'ISO_LANGUAGE'], $lang_ary['lang_iso']),
));
foreach ($lang_ary['fields'] as $field_ident => $field_ary)
{
$template->assign_block_vars('options.field', array(
phpbb::$template->assign_block_vars('options.field', array(
'L_TITLE' => $field_ary['TITLE'],
'L_EXPLAIN' => (isset($field_ary['EXPLAIN'])) ? $field_ary['EXPLAIN'] : '',
'FIELD' => $field_ary['FIELD'])
);
'FIELD' => $field_ary['FIELD'],
));
}
}
break;
}
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
phpbb::$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
return;
@ -860,7 +860,7 @@ class acp_profile
$s_one_need_edit = true;
}
$template->assign_block_vars('fields', array(
phpbb::$template->assign_block_vars('fields', array(
'FIELD_IDENT' => $row['field_ident'],
'FIELD_TYPE' => phpbb::$user->lang['FIELD_' . strtoupper(custom_profile::$profile_types[$row['field_type']])],
@ -872,15 +872,15 @@ class acp_profile
'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;order={$row['field_order']}",
'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;order={$row['field_order']}",
'S_NEED_EDIT' => $s_need_edit)
);
'S_NEED_EDIT' => $s_need_edit,
));
}
phpbb::$db->sql_freeresult($result);
// At least one option field needs editing?
if ($s_one_need_edit)
{
$template->assign_var('S_NEED_EDIT', true);
phpbb::$template->assign_var('S_NEED_EDIT', true);
}
$s_select_type = '';
@ -889,10 +889,10 @@ class acp_profile
$s_select_type .= '<option value="' . $key . '">' . phpbb::$user->lang['FIELD_' . strtoupper($value)] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_TYPE_OPTIONS' => $s_select_type)
);
'S_TYPE_OPTIONS' => $s_select_type,
));
}
/**

View File

@ -85,9 +85,9 @@ class acp_prune
$prunedate_posted = time() - ($prune_posted * 86400);
$prunedate_viewed = time() - ($prune_viewed * 86400);
$template->assign_vars(array(
'S_PRUNED' => true)
);
phpbb::$template->assign_vars(array(
'S_PRUNED' => true,
));
$sql_forum = (sizeof($forum_id)) ? ' AND ' . phpbb::$db->sql_in_set('forum_id', $forum_id) : '';
@ -136,11 +136,11 @@ class acp_prune
$prune_ids[] = $row['forum_id'];
$template->assign_block_vars('pruned', array(
phpbb::$template->assign_block_vars('pruned', array(
'FORUM_NAME' => $row['forum_name'],
'NUM_TOPICS' => $p_result['topics'],
'NUM_POSTS' => $p_result['posts'])
);
'NUM_POSTS' => $p_result['posts'],
));
$log_data .= (($log_data != '') ? ', ' : '') . $row['forum_name'];
}
@ -176,11 +176,11 @@ class acp_prune
// display a select box to use for pruning.
if (!sizeof($forum_id))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_SELECT_FORUM' => true,
'S_FORUM_OPTIONS' => make_forum_select(false, false, false))
);
'S_FORUM_OPTIONS' => make_forum_select(false, false, false),
));
}
else
{
@ -208,13 +208,13 @@ class acp_prune
$l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_SELECTED_FORUMS' => phpbb::$user->lang[$l_selected_forums],
'U_ACTION' => $this->u_action,
'U_BACK' => $this->u_action,
'FORUM_LIST' => $forum_list,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
}
}
@ -290,14 +290,14 @@ class acp_prune
// Assign to template
foreach ($user_ids as $user_id)
{
$template->assign_block_vars('users', array(
phpbb::$template->assign_block_vars('users', array(
'USERNAME' => $usernames[$user_id],
'U_PROFILE' => append_sid('memberlist', 'mode=viewprofile&amp;u=' . $user_id),
'U_USER_ADMIN' => (phpbb::$acl->acl_get('a_user')) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=users&amp;mode=overview&amp;u=' . $user_id, true, phpbb::$user->session_id) : '',
));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DEACTIVATE' => ($action == 'deactivate') ? true : false,
'S_DELETE' => ($action == 'delete') ? true : false,
));
@ -345,7 +345,7 @@ class acp_prune
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_JOINED_OPTIONS' => $s_find_join_time,
'S_ACTIVE_OPTIONS' => $s_find_active_time,

View File

@ -190,7 +190,7 @@ class acp_ranks
$filename_list = '<option value=""' . (($edit_img == '') ? ' selected="selected"' : '') . '>----------</option>' . $filename_list;
unset($existing_imgs, $imglist);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'U_BACK' => $this->u_action,
'RANKS_PATH' => PHPBB_ROOT_PATH . phpbb::$config['ranks_path'],
@ -200,8 +200,8 @@ class acp_ranks
'S_FILENAME_LIST' => $filename_list,
'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)
);
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0,
));
return;
@ -209,9 +209,9 @@ class acp_ranks
break;
}
$template->assign_vars(array(
'U_ACTION' => $this->u_action)
);
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
));
$sql = 'SELECT *
FROM ' . RANKS_TABLE . '
@ -220,7 +220,7 @@ class acp_ranks
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('ranks', array(
phpbb::$template->assign_block_vars('ranks', array(
'S_RANK_IMAGE' => ($row['rank_image']) ? true : false,
'S_SPECIAL_RANK' => ($row['rank_special']) ? true : false,
@ -229,8 +229,8 @@ class acp_ranks
'MIN_POSTS' => $row['rank_min'],
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['rank_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['rank_id'])
);
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['rank_id'],
));
}
phpbb::$db->sql_freeresult($result);

View File

@ -164,7 +164,7 @@ class acp_reasons
$translated = true;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['REASON_' . $l_title],
'U_ACTION' => $this->u_action . "&amp;id=$reason_id&amp;action=$action",
'U_BACK' => $this->u_action,
@ -180,8 +180,7 @@ class acp_reasons
'S_EDIT_REASON' => true,
'S_TRANSLATED' => $translated,
'S_ERROR' => (sizeof($error)) ? true : false,
)
);
));
return;
break;
@ -282,10 +281,9 @@ class acp_reasons
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
)
);
));
// Reason count
$sql = 'SELECT reason_id, COUNT(reason_id) AS reason_count
@ -319,7 +317,7 @@ class acp_reasons
$translated = true;
}
$template->assign_block_vars('reasons', array(
phpbb::$template->assign_block_vars('reasons', array(
'REASON_TITLE' => $row['reason_title'],
'REASON_DESCRIPTION' => $row['reason_description'],
'REASON_COUNT' => (isset($reason_count[$row['reason_id']])) ? $reason_count[$row['reason_id']] : 0,
@ -330,8 +328,8 @@ class acp_reasons
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['reason_id'],
'U_DELETE' => (!$other_reason) ? $this->u_action . '&amp;action=delete&amp;id=' . $row['reason_id'] : '',
'U_MOVE_UP' => $this->u_action . '&amp;action=move_up&amp;order=' . $row['reason_order'],
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['reason_order'])
);
'U_MOVE_DOWN' => $this->u_action . '&amp;action=move_down&amp;order=' . $row['reason_order'],
));
}
phpbb::$db->sql_freeresult($result);
}

View File

@ -81,10 +81,10 @@ class acp_search
if (!$submit)
{
$template->assign_block_vars('backend', array(
phpbb::$template->assign_block_vars('backend', array(
'NAME' => $name,
'SETTINGS' => $vars['tpl'])
);
'SETTINGS' => $vars['tpl'],
));
}
else if (is_array($vars['config']))
{
@ -205,7 +205,7 @@ class acp_search
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_SETTINGS';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'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'],
@ -216,8 +216,8 @@ class acp_search
'S_YES_SEARCH' => (bool) phpbb::$config['load_search'],
'S_SETTINGS' => true,
'U_ACTION' => $this->u_action)
);
'U_ACTION' => $this->u_action,
));
}
function index($id, $mode)
@ -461,24 +461,24 @@ class acp_search
}
}
$template->assign_block_vars('backend', array(
phpbb::$template->assign_block_vars('backend', array(
'L_NAME' => $name,
'NAME' => $type,
'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))
);
'S_STATS' => (bool) sizeof($statistics),
));
foreach ($statistics as $statistic)
{
$template->assign_block_vars('backend.data', array(
phpbb::$template->assign_block_vars('backend.data', array(
'STATISTIC_1' => $statistic['statistic_1'],
'VALUE_1' => $statistic['value_1'],
'STATISTIC_2' => (isset($statistic['statistic_2'])) ? $statistic['statistic_2'] : '',
'VALUE_2' => (isset($statistic['value_2'])) ? $statistic['value_2'] : '')
);
'VALUE_2' => (isset($statistic['value_2'])) ? $statistic['value_2'] : '',
));
}
}
unset($search);
@ -489,7 +489,7 @@ class acp_search
$this->tpl_name = 'acp_search';
$this->page_title = 'ACP_SEARCH_INDEX';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_INDEX' => true,
'U_ACTION' => $this->u_action,
'U_PROGRESS_BAR' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=$id&amp;mode=$mode&amp;action=progress_bar"),
@ -498,12 +498,12 @@ class acp_search
if (isset($this->state[1]))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CONTINUE_INDEXING' => $this->state[1],
'U_CONTINUE_INDEXING' => $this->u_action . '&amp;action=' . $this->state[1],
'L_CONTINUE' => ($this->state[1] == 'create') ? phpbb::$user->lang['CONTINUE_INDEXING'] : phpbb::$user->lang['CONTINUE_DELETING_INDEX'],
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? phpbb::$user->lang['CONTINUE_INDEXING_EXPLAIN'] : phpbb::$user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
);
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? phpbb::$user->lang['CONTINUE_INDEXING_EXPLAIN'] : phpbb::$user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'],
));
}
}
@ -513,14 +513,14 @@ class acp_search
page_header(phpbb::$user->lang[$l_type]);
$template->set_filenames(array(
'body' => 'progress_bar.html')
);
phpbb::$template->set_filenames(array(
'body' => 'progress_bar.html',
));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_PROGRESS' => phpbb::$user->lang[$l_type],
'L_PROGRESS_EXPLAIN' => phpbb::$user->lang[$l_type . '_EXPLAIN'])
);
'L_PROGRESS_EXPLAIN' => phpbb::$user->lang[$l_type . '_EXPLAIN'],
));
page_footer();
}

View File

@ -510,7 +510,7 @@ parse_css_file = {PARSE_CSS_FILE}
$this->page_title = 'ACP_' . $l_prefix . 'S';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FRONTEND' => true,
'S_STYLE' => ($mode == 'style') ? true : false,
@ -523,8 +523,7 @@ parse_css_file = {PARSE_CSS_FILE}
'L_CREATE' => phpbb::$user->lang['CREATE_' . $l_prefix],
'U_ACTION' => $this->u_action,
)
);
));
$sql = "SELECT *
FROM $sql_from";
@ -552,7 +551,7 @@ parse_css_file = {PARSE_CSS_FILE}
$s_actions[] = '<a href="' . $this->u_action . "&amp;action=$option&amp;id=" . $row[$mode . '_id'] . '">' . phpbb::$user->lang[strtoupper($option)] . '</a>';
}
$template->assign_block_vars('installed', array(
phpbb::$template->assign_block_vars('installed', array(
'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'],
@ -563,8 +562,7 @@ parse_css_file = {PARSE_CSS_FILE}
'NAME' => $row[$mode . '_name'],
'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
)
);
));
}
phpbb::$db->sql_freeresult($result);
@ -605,18 +603,18 @@ parse_css_file = {PARSE_CSS_FILE}
{
foreach ($new_ary as $cfg)
{
$template->assign_block_vars('uninstalled', array(
phpbb::$template->assign_block_vars('uninstalled', array(
'NAME' => $cfg['name'],
'COPYRIGHT' => $cfg['copyright'],
'U_INSTALL' => $this->u_action . '&amp;action=install&amp;path=' . urlencode($cfg['path']))
);
'U_INSTALL' => $this->u_action . '&amp;action=install&amp;path=' . urlencode($cfg['path']),
));
}
}
unset($new_ary);
$template->assign_vars(array(
'S_BASIS_OPTIONS' => $basis_options)
);
phpbb::$template->assign_vars(array(
'S_BASIS_OPTIONS' => $basis_options,
));
}
@ -766,7 +764,7 @@ parse_css_file = {PARSE_CSS_FILE}
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_TEMPLATE' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $template_file)),
'S_TEMPLATES' => $tpl_options,
@ -786,8 +784,8 @@ parse_css_file = {PARSE_CSS_FILE}
'SELECTED_TEMPLATE' => $template_info['template_name'],
'TEMPLATE_FILE' => $template_file,
'TEMPLATE_DATA' => utf8_htmlspecialchars($template_data),
'TEXT_ROWS' => $text_rows)
);
'TEXT_ROWS' => $text_rows,
));
}
/**
@ -829,13 +827,13 @@ parse_css_file = {PARSE_CSS_FILE}
{
page_header(phpbb::$user->lang['TEMPLATE_CACHE']);
$template->set_filenames(array(
'body' => 'viewsource.html')
);
phpbb::$template->set_filenames(array(
'body' => 'viewsource.html',
));
$template->assign_vars(array(
'FILENAME' => str_replace('.', '/', $source) . '.html')
);
phpbb::$template->assign_vars(array(
'FILENAME' => str_replace('.', '/', $source) . '.html',
));
$code = str_replace(array("\r\n", "\r"), array("\n", "\n"), file_get_contents(PHPBB_ROOT_PATH . "cache/{$cache_prefix}_$source.html." . PHP_EXT));
@ -859,10 +857,10 @@ parse_css_file = {PARSE_CSS_FILE}
foreach ($code as $key => $line)
{
$template->assign_block_vars('source', array(
phpbb::$template->assign_block_vars('source', array(
'LINENUM' => $key + 1,
'LINE' => preg_replace('#([^ ;])&nbsp;([^ &])#', '$1 $2', $line))
);
'LINE' => preg_replace('#([^ ;])&nbsp;([^ &])#', '$1 $2', $line),
));
unset($code[$key]);
}
@ -888,23 +886,23 @@ parse_css_file = {PARSE_CSS_FILE}
continue;
}
$template->assign_block_vars('file', array(
phpbb::$template->assign_block_vars('file', array(
'U_VIEWSOURCE' => $this->u_action . "&amp;action=cache&amp;id=$template_id&amp;source=$file",
'CACHED' => phpbb::$user->format_date(filemtime(PHPBB_ROOT_PATH . "cache/$filename")),
'FILENAME' => $file,
'FILESIZE' => sprintf('%.1f ' . phpbb::$user->lang['KIB'], filesize(PHPBB_ROOT_PATH . "cache/$filename") / 1024),
'MODIFIED' => phpbb::$user->format_date(filemtime(PHPBB_ROOT_PATH . "styles/{$template_row['template_path']}/template/$tpl_file.html")))
);
'MODIFIED' => phpbb::$user->format_date(filemtime(PHPBB_ROOT_PATH . "styles/{$template_row['template_path']}/template/$tpl_file.html")),
));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CACHE' => true,
'S_TEMPLATE' => true,
'U_ACTION' => $this->u_action . "&amp;action=cache&amp;id=$template_id",
'U_BACK' => $this->u_action)
);
'U_BACK' => $this->u_action,
));
}
/**
@ -1068,7 +1066,7 @@ parse_css_file = {PARSE_CSS_FILE}
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_THEME' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields(array('template_file' => $theme_file)),
'S_THEME_IN_DB' => $theme_info['theme_storedb'],
@ -1089,8 +1087,8 @@ parse_css_file = {PARSE_CSS_FILE}
'SELECTED_TEMPLATE' => $theme_info['theme_name'],
'TEMPLATE_FILE' => $theme_file,
'TEMPLATE_DATA' => utf8_htmlspecialchars($theme_data),
'TEXT_ROWS' => $text_rows)
);
'TEXT_ROWS' => $text_rows,
));
}
@ -1228,7 +1226,7 @@ parse_css_file = {PARSE_CSS_FILE}
add_log('admin', 'LOG_IMAGESET_EDIT', $imageset_name);
$template->assign_var('SUCCESS', true);
phpbb::$template->assign_var('SUCCESS', true);
$image_filename = $imgfilename;
$image_width = $imgwidth;
@ -1282,8 +1280,8 @@ parse_css_file = {PARSE_CSS_FILE}
$img_options = '';
foreach ($this->imageset_keys as $category => $img_ary)
{
$template->assign_block_vars('category', array(
'NAME' => phpbb::$user->lang['IMG_CAT_' . strtoupper($category)]
phpbb::$template->assign_block_vars('category', array(
'NAME' => phpbb::$user->lang['IMG_CAT_' . strtoupper($category)],
));
foreach ($img_ary as $img)
@ -1292,19 +1290,19 @@ parse_css_file = {PARSE_CSS_FILE}
{
foreach ($langs as $language)
{
$template->assign_block_vars('category.images', array(
phpbb::$template->assign_block_vars('category.images', array(
'SELECTED' => ($img == $imgname && $language == $imgnamelang),
'VALUE' => $img . '-' . $language,
'TEXT' => phpbb::$user->lang['IMG_' . strtoupper($img)] . ' [ ' . $language . ' ]'
'TEXT' => phpbb::$user->lang['IMG_' . strtoupper($img)] . ' [ ' . $language . ' ]',
));
}
}
else
{
$template->assign_block_vars('category.images', array(
phpbb::$template->assign_block_vars('category.images', array(
'SELECTED' => ($img == $imgname),
'VALUE' => $img,
'TEXT' => (($category == 'custom') ? $img : phpbb::$user->lang['IMG_' . strtoupper($img)])
'TEXT' => (($category == 'custom') ? $img : phpbb::$user->lang['IMG_' . strtoupper($img)]),
));
}
}
@ -1320,8 +1318,8 @@ parse_css_file = {PARSE_CSS_FILE}
{
if ($type !== 'lang' || $sql_extra)
{
$template->assign_block_vars('imagesetlist', array(
'TYPE' => ($type == 'lang')
phpbb::$template->assign_block_vars('imagesetlist', array(
'TYPE' => ($type == 'lang'),
));
}
@ -1334,10 +1332,10 @@ parse_css_file = {PARSE_CSS_FILE}
$image_found = true;
$img_val = htmlspecialchars($img);
}
$template->assign_block_vars('imagesetlist.images', array(
phpbb::$template->assign_block_vars('imagesetlist.images', array(
'SELECTED' => $selected,
'TEXT' => $imgtext,
'VALUE' => htmlspecialchars($img)
'VALUE' => htmlspecialchars($img),
));
}
}
@ -1345,7 +1343,7 @@ parse_css_file = {PARSE_CSS_FILE}
$imgsize_bool = (!empty($imgname) && $image_width && $image_height) ? true : false;
$image_request = '../styles/' . $imageset_path . '/imageset/' . ($image_lang ? $imgnamelang . '/' : '') . $image_filename;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_IMAGESET' => true,
'L_TITLE' => phpbb::$user->lang[$this->page_title],
'L_EXPLAIN' => phpbb::$user->lang[$this->page_title . '_EXPLAIN'],
@ -1359,7 +1357,7 @@ parse_css_file = {PARSE_CSS_FILE}
'A_NAME' => addslashes($imageset_name),
'ERROR' => !$valid_name,
'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png',
'IMAGE_SELECT' => $image_found
'IMAGE_SELECT' => $image_found,
));
}
@ -1479,7 +1477,7 @@ parse_css_file = {PARSE_CSS_FILE}
$this->page_title = 'DELETE_' . $l_prefix;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DELETE' => true,
'S_REPLACE_OPTIONS' => $s_options,
@ -1493,8 +1491,7 @@ parse_css_file = {PARSE_CSS_FILE}
'U_BACK' => $this->u_action,
'NAME' => $style_row[$mode . '_name'],
)
);
));
}
/**
@ -1874,7 +1871,7 @@ parse_css_file = {PARSE_CSS_FILE}
$format_buttons .= '<label><input type="radio"' . ((!$format_buttons) ? ' id="format"' : '') . ' class="radio" value="' . $method . '" name="format"' . (($method == $format) ? ' checked="checked"' : '') . ' /> ' . $method . '</label>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EXPORT' => true,
'S_ERROR_MSG' => (sizeof($error)) ? true : false,
'S_STYLE' => ($mode == 'style') ? true : false,
@ -1888,8 +1885,8 @@ parse_css_file = {PARSE_CSS_FILE}
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'NAME' => $style_row[$mode . '_name'],
'FORMAT_BUTTONS' => $format_buttons)
);
'FORMAT_BUTTONS' => $format_buttons,
));
}
/**
@ -2078,7 +2075,7 @@ parse_css_file = {PARSE_CSS_FILE}
$this->page_title = 'EDIT_DETAILS_' . $l_type;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DETAILS' => true,
'S_ERROR_MSG' => (sizeof($error)) ? true : false,
'S_STYLE' => ($mode == 'style') ? true : false,
@ -2104,8 +2101,7 @@ parse_css_file = {PARSE_CSS_FILE}
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'NAME' => $style_row[$mode . '_name'],
'COPYRIGHT' => $style_row[$mode . '_copyright'],
)
);
));
}
/**
@ -2363,7 +2359,7 @@ parse_css_file = {PARSE_CSS_FILE}
$this->page_title = 'INSTALL_' . $l_type;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DETAILS' => true,
'S_INSTALL' => true,
'S_ERROR_MSG' => (sizeof($error)) ? true : false,
@ -2388,8 +2384,8 @@ parse_css_file = {PARSE_CSS_FILE}
'COPYRIGHT' => $style_row[$mode . '_copyright'],
'TEMPLATE_NAME' => ($mode == 'style') ? $style_row['template_name'] : '',
'THEME_NAME' => ($mode == 'style') ? $style_row['theme_name'] : '',
'IMAGESET_NAME' => ($mode == 'style') ? $style_row['imageset_name'] : '')
);
'IMAGESET_NAME' => ($mode == 'style') ? $style_row['imageset_name'] : '',
));
}
/**
@ -2510,7 +2506,7 @@ parse_css_file = {PARSE_CSS_FILE}
$this->page_title = 'ADD_' . $l_type;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_DETAILS' => true,
'S_ADD' => true,
'S_ERROR_MSG' => (sizeof($error)) ? true : false,
@ -2536,8 +2532,8 @@ parse_css_file = {PARSE_CSS_FILE}
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
'NAME' => $style_row[$mode . '_name'],
'COPYRIGHT' => $style_row[$mode . '_copyright'])
);
'COPYRIGHT' => $style_row[$mode . '_copyright'],
));
}

View File

@ -60,7 +60,7 @@ class acp_update
$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(phpbb::$config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_UP_TO_DATE' => $up_to_date,
'S_UP_TO_DATE_AUTO' => $up_to_date_automatic,
'S_VERSION_CHECK' => true,

View File

@ -59,10 +59,10 @@ class acp_users
$domain = gethostbyaddr($user_ip);
$ipwhois = user_ipwhois($user_ip);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MESSAGE_TITLE' => sprintf(phpbb::$user->lang['IP_WHOIS_FOR'], $domain),
'MESSAGE_TEXT' => nl2br($ipwhois))
);
'MESSAGE_TEXT' => nl2br($ipwhois),
));
return;
}
@ -72,7 +72,7 @@ class acp_users
{
$this->page_title = 'SELECT_USER';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'ANONYMOUS_USER_ID' => ANONYMOUS,
@ -143,13 +143,13 @@ class acp_users
$s_form_options .= '<option value="' . $module_mode . '"' . $selected . '>' . phpbb::$user->lang['ACP_USER_' . strtoupper($module_mode)] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_BACK' => $this->u_action,
'U_MODE_SELECT' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=$id&amp;u=$user_id"),
'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
'S_FORM_OPTIONS' => $s_form_options,
'MANAGED_USERNAME' => $user_row['username'])
);
'MANAGED_USERNAME' => $user_row['username'],
));
// Prevent normal users/admins change/view founders if they are not a founder by themselves
if (!phpbb::$user->is_founder && $user_row['user_type'] == phpbb::USER_FOUNDER)
@ -509,12 +509,12 @@ class acp_users
{
$this->page_title = 'USER_ADMIN_MOVE_POSTS';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SELECT_FORUM' => true,
'U_ACTION' => $this->u_action . "&amp;action=$action&amp;u=$user_id",
'U_BACK' => $this->u_action . "&amp;u=$user_id",
'S_FORUM_OPTIONS' => make_forum_select(false, false, false, true))
);
'S_FORUM_OPTIONS' => make_forum_select(false, false, false, true),
));
return;
}
@ -899,7 +899,7 @@ class acp_users
$user_row['posts_in_queue'] = (int) phpbb::$db->sql_fetchfield('posts_in_queue');
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_NAME_CHARS_EXPLAIN' => sprintf(phpbb::$user->lang[phpbb::$config['allow_name_chars'] . '_EXPLAIN'], phpbb::$config['min_name_chars'], phpbb::$config['max_name_chars']),
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf(phpbb::$user->lang[phpbb::$config['pass_complex'] . '_EXPLAIN'], phpbb::$config['min_pass_chars'], phpbb::$config['max_pass_chars']),
'L_POSTS_IN_QUEUE' => phpbb::$user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']),
@ -1009,7 +1009,7 @@ class acp_users
$log_count = 0;
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(
phpbb::$template->assign_vars(array(
'S_FEEDBACK' => 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),
@ -1017,18 +1017,18 @@ class acp_users
'S_LIMIT_DAYS' => $s_limit_days,
'S_SORT_KEY' => $s_sort_key,
'S_SORT_DIR' => $s_sort_dir,
'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'))
);
'S_CLEARLOGS' => phpbb::$acl->acl_get('a_clearlogs'),
));
foreach ($log_data as $row)
{
$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' => nl2br($row['action']),
'ID' => $row['id'])
);
'ID' => $row['id'],
));
}
break;
@ -1211,7 +1211,7 @@ class acp_users
}
unset($now);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ICQ' => $data['icq'],
'YIM' => $data['yim'],
'AIM' => $data['aim'],
@ -1226,8 +1226,8 @@ class acp_users
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
'S_PROFILE' => true)
);
'S_PROFILE' => true,
));
// Get additional profile fields and assign them to the template block var 'profile_fields'
phpbb::$user->get_profile_fields($user_id);
@ -1401,7 +1401,7 @@ class acp_users
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_PREFS' => true,
'S_JABBER_DISABLED' => (phpbb::$config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
@ -1442,8 +1442,7 @@ class acp_users
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => style_select($data['style']),
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
)
);
));
break;
@ -1483,7 +1482,7 @@ class acp_users
avatar_gallery($category, $avatar_select, 4);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_AVATAR' => true,
'S_CAN_UPLOAD' => ($can_upload && phpbb::$config['allow_avatar_upload']) ? true : false,
'S_ALLOW_REMOTE' => (phpbb::$config['allow_avatar_remote']) ? true : false,
@ -1495,8 +1494,8 @@ class acp_users
'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'],
'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'],
'L_AVATAR_EXPLAIN' => sprintf(phpbb::$user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], round(phpbb::$config['avatar_filesize'] / 1024)))
);
'L_AVATAR_EXPLAIN' => sprintf(phpbb::$user->lang['AVATAR_EXPLAIN'], phpbb::$config['avatar_max_width'], phpbb::$config['avatar_max_height'], round(phpbb::$config['avatar_filesize'] / 1024)),
));
break;
@ -1534,10 +1533,10 @@ class acp_users
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_RANK' => true,
'S_RANK_OPTIONS' => $s_rank_options)
);
'S_RANK_OPTIONS' => $s_rank_options,
));
break;
@ -1603,7 +1602,7 @@ class acp_users
decode_message($signature, $user_row['user_sig_bbcode_uid']);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SIGNATURE' => true,
'SIGNATURE' => $signature,
@ -1625,8 +1624,8 @@ class acp_users
'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)
);
'S_LINKS_ALLOWED' => (phpbb::$config['allow_sig_links']) ? true : false,
));
// Assigning custom bbcodes
display_custom_bbcodes();
@ -1752,7 +1751,7 @@ class acp_users
$view_topic = append_sid('viewtopic', "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . '#p' . $row['post_msg_id'];
}
$template->assign_block_vars('attach', array(
phpbb::$template->assign_block_vars('attach', array(
'REAL_FILENAME' => $row['real_filename'],
'COMMENT' => nl2br($row['attach_comment']),
'EXTENSION' => $row['extension'],
@ -1768,19 +1767,19 @@ class acp_users
'S_IN_MESSAGE' => $row['in_message'],
'U_DOWNLOAD' => append_sid('download/file', 'mode=view&amp;id=' . $row['attach_id']),
'U_VIEW_TOPIC' => $view_topic)
);
'U_VIEW_TOPIC' => $view_topic,
));
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ATTACHMENTS' => true,
'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, phpbb::$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;
@ -1935,15 +1934,15 @@ class acp_users
{
if ($current_type != $group_type)
{
$template->assign_block_vars('group', array(
phpbb::$template->assign_block_vars('group', array(
'S_NEW_GROUP_TYPE' => true,
'GROUP_TYPE' => phpbb::$user->lang['USER_GROUP_' . strtoupper($group_type)])
);
'GROUP_TYPE' => phpbb::$user->lang['USER_GROUP_' . strtoupper($group_type)],
));
}
foreach ($data_ary as $data)
{
$template->assign_block_vars('group', array(
phpbb::$template->assign_block_vars('group', array(
'U_EDIT_GROUP' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=groups&amp;mode=manage&amp;action=edit&amp;u=$user_id&amp;g={$data['group_id']}&amp;back_link=acp_users_groups"),
'U_DEFAULT' => $this->u_action . "&amp;action=default&amp;u=$user_id&amp;g=" . $data['group_id'],
'U_DEMOTE_PROMOTE' => $this->u_action . '&amp;action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&amp;u=$user_id&amp;g=" . $data['group_id'],
@ -1954,15 +1953,14 @@ class acp_users
'S_NO_DEFAULT' => ($user_row['group_id'] != $data['group_id']) ? true : false,
'S_SPECIAL_GROUP' => ($group_type == 'special') ? true : false,
)
);
));
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_GROUPS' => true,
'S_GROUP_OPTIONS' => $s_group_options)
);
'S_GROUP_OPTIONS' => $s_group_options,
));
break;
@ -2019,7 +2017,7 @@ class acp_users
$s_forum_options = '<option value="0"' . ((!$forum_id) ? ' selected="selected"' : '') . '>' . phpbb::$user->lang['VIEW_GLOBAL_PERMS'] . '</option>';
$s_forum_options .= make_forum_select($forum_id, false, true, false, false, false);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_PERMISSIONS' => true,
'S_GLOBAL' => (!$forum_id) ? true : false,
@ -2027,18 +2025,18 @@ class acp_users
'U_ACTION' => $this->u_action . '&amp;u=' . $user_id,
'U_USER_PERMISSIONS' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions&amp;mode=setting_user_global&amp;user_id[]=' . $user_id),
'U_USER_FORUM_PERMISSIONS' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions&amp;mode=setting_user_local&amp;user_id[]=' . $user_id))
);
'U_USER_FORUM_PERMISSIONS' => append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, 'i=permissions&amp;mode=setting_user_local&amp;user_id[]=' . $user_id),
));
break;
}
// Assign general variables
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ERROR' => (sizeof($error)) ? true : false,
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '')
);
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
));
}
/**

View File

@ -62,14 +62,14 @@ class acp_words
case 'add':
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT_WORD' => true,
'U_ACTION' => $this->u_action,
'U_BACK' => $this->u_action,
'WORD' => (isset($word_info['word'])) ? $word_info['word'] : '',
'REPLACEMENT' => (isset($word_info['replacement'])) ? $word_info['replacement'] : '',
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
return;
@ -156,10 +156,10 @@ class acp_words
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
$sql = 'SELECT *
FROM ' . WORDS_TABLE . '
@ -168,12 +168,12 @@ class acp_words
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('words', array(
phpbb::$template->assign_block_vars('words', array(
'WORD' => $row['word'],
'REPLACEMENT' => $row['replacement'],
'U_EDIT' => $this->u_action . '&amp;action=edit&amp;id=' . $row['word_id'],
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['word_id'])
);
'U_DELETE' => $this->u_action . '&amp;action=delete&amp;id=' . $row['word_id'],
));
}
phpbb::$db->sql_freeresult($result);
}

View File

@ -369,7 +369,7 @@ class auth_admin extends auth
$s_role_js_array = implode('', $s_role_js_array);
}
$template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
phpbb::$template->assign_var('S_ROLE_JS_ARRAY', $s_role_js_array);
unset($s_role_js_array);
// Now obtain memberships
@ -432,7 +432,7 @@ class auth_admin extends auth
$content_array = $categories = array();
self::build_permission_array($hold_ary[$forum_id], $content_array, $categories, array_keys($ug_names_ary));
$template->assign_block_vars($tpl_pmask, array(
phpbb::$template->assign_block_vars($tpl_pmask, array(
'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
@ -446,8 +446,8 @@ class auth_admin extends auth
'S_VIEW' => ($mode == 'view') ? true : false,
'S_NUM_OBJECTS' => sizeof($content_array),
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
);
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false,
));
@reset($content_array);
while (list($ug_id, $ug_array) = each($content_array))
@ -490,13 +490,13 @@ class auth_admin extends auth
$s_custom_permissions = false;
}
$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
phpbb::$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
'NAME' => $ug_names_ary[$ug_id],
'S_ROLE_OPTIONS' => $s_role_options,
'UG_ID' => $ug_id,
'S_CUSTOM' => $s_custom_permissions,
'FORUM_ID' => $forum_id)
);
'FORUM_ID' => $forum_id,
));
self::assign_cat_array($ug_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
@ -518,7 +518,7 @@ class auth_admin extends auth
$content_array = $categories = array();
self::build_permission_array($hold_ary[$ug_id], $content_array, $categories, array_keys($forum_names_ary));
$template->assign_block_vars($tpl_pmask, array(
phpbb::$template->assign_block_vars($tpl_pmask, array(
'NAME' => $ug_name,
'CATEGORIES' => implode('</th><th>', $categories),
@ -532,8 +532,8 @@ class auth_admin extends auth
'S_VIEW' => ($mode == 'view') ? true : false,
'S_NUM_OBJECTS' => sizeof($content_array),
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
);
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false,
));
@reset($content_array);
while (list($forum_id, $forum_array) = each($content_array))
@ -576,14 +576,14 @@ class auth_admin extends auth
$s_custom_permissions = false;
}
$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
phpbb::$template->assign_block_vars($tpl_pmask . '.' . $tpl_fmask, array(
'NAME' => ($forum_id == 0) ? $forum_names_ary[0] : $forum_names_ary[$forum_id]['forum_name'],
'PADDING' => ($forum_id == 0) ? '' : $forum_names_ary[$forum_id]['padding'],
'S_ROLE_OPTIONS' => $s_role_options,
'S_CUSTOM' => $s_custom_permissions,
'UG_ID' => $ug_id,
'FORUM_ID' => $forum_id)
);
'FORUM_ID' => $forum_id,
));
self::assign_cat_array($forum_array, $tpl_pmask . '.' . $tpl_fmask . '.' . $tpl_category, $tpl_mask, $ug_id, $forum_id, $show_trace, ($mode == 'view'));
}
@ -622,10 +622,10 @@ class auth_admin extends auth
{
$auth_ary = $hold_ary[$forum_id];
$template->assign_block_vars('role_mask', array(
phpbb::$template->assign_block_vars('role_mask', array(
'NAME' => ($forum_id == 0) ? phpbb::$user->lang['GLOBAL_MASK'] : $forum_name,
'FORUM_ID' => $forum_id)
);
'FORUM_ID' => $forum_id,
));
if (isset($auth_ary['users']) && sizeof($auth_ary['users']))
{
@ -637,11 +637,11 @@ class auth_admin extends auth
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('role_mask.users', array(
phpbb::$template->assign_block_vars('role_mask.users', array(
'USER_ID' => $row['user_id'],
'USERNAME' => $row['username'],
'U_PROFILE' => append_sid('memberlist', "mode=viewprofile&amp;u={$row['user_id']}"))
);
'U_PROFILE' => append_sid('memberlist', "mode=viewprofile&amp;u={$row['user_id']}"),
));
}
phpbb::$db->sql_freeresult($result);
}
@ -656,11 +656,11 @@ class auth_admin extends auth
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('role_mask.groups', array(
phpbb::$template->assign_block_vars('role_mask.groups', array(
'GROUP_ID' => $row['group_id'],
'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $row['group_name']] : $row['group_name'],
'U_PROFILE' => append_sid('memberlist', "mode=group&amp;g={$row['group_id']}"))
);
'U_PROFILE' => append_sid('memberlist', "mode=group&amp;g={$row['group_id']}"),
));
}
phpbb::$db->sql_freeresult($result);
}
@ -1061,13 +1061,13 @@ class auth_admin extends auth
@reset($category_array);
while (list($cat, $cat_array) = each($category_array))
{
$template->assign_block_vars($tpl_cat, array(
phpbb::$template->assign_block_vars($tpl_cat, array(
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false,
'CAT_NAME' => phpbb::$user->lang['permission_cat'][$cat])
);
'CAT_NAME' => phpbb::$user->lang['permission_cat'][$cat],
));
/* Sort permissions by name (more naturaly and user friendly than sorting by a primary key)
* Commented out due to it's memory consumption and time needed
@ -1089,7 +1089,7 @@ class auth_admin extends auth
{
if ($s_view)
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
phpbb::$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false,
'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false,
@ -1101,12 +1101,12 @@ class auth_admin extends auth
'U_TRACE' => ($show_trace) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'])
);
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'],
));
}
else
{
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
phpbb::$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
'S_YES' => ($allowed == phpbb::ACL_YES) ? true : false,
'S_NEVER' => ($allowed == phpbb::ACL_NEVER) ? true : false,
'S_NO' => ($allowed == phpbb::ACL_NO) ? true : false,
@ -1119,8 +1119,8 @@ class auth_admin extends auth
'U_TRACE' => ($show_trace) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=permissions&amp;mode=trace&amp;u=$ug_id&amp;f=$forum_id&amp;auth=$permission") : '',
'UA_TRACE' => ($show_trace) ? append_sid(PHPBB_ADMIN_PATH . 'index.' . PHP_EXT, "i=permissions&mode=trace&u=$ug_id&f=$forum_id&auth=$permission", false) : '',
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'])
);
'PERMISSION' => phpbb::$user->lang['acl_' . $permission]['lang'],
));
}
}
}

View File

@ -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);
}
}
}

View File

@ -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;
}

View File

@ -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&amp;mode=approve_details&amp;f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']),
'U_MCP_FORUM' => (!$global_topic) ? append_sid('mcp', 'i=main&amp;mode=forum_view&amp;f=' . $row['forum_id']) : '',
'U_MCP_TOPIC' => append_sid('mcp', 'i=main&amp;mode=topic_view&amp;f=' . $row['forum_id'] . '&amp;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'] . '&amp;p=' . $row['post_id'] . "&amp;i=reports&amp;mode=report_details"),
'U_MCP_FORUM' => (!$global_topic) ? append_sid('mcp', 'f=' . $row['forum_id'] . "&amp;i=$id&amp;mode=forum_view") : '',
'U_MCP_TOPIC' => append_sid('mcp', 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . "&amp;i=$id&amp;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&amp;mode=forum_view'), 0, false, 'm_', true);
}

View File

@ -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 . "&amp;$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'],
)
);
));
}
}
}

View File

@ -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');
}

View File

@ -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&amp;form=mcp&amp;field=username&amp;select_single=true'),
'U_POST_ACTION' => append_sid('mcp', 'i=notes&amp;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,
)
);
));
}
}

View File

@ -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&amp;mode=$mode&amp;p=$post_id") . '">', '</a>'),
'U_RETURN_POST' => append_sid('mcp', "i=$id&amp;mode=$mode&amp;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&amp;i=main&amp;quickmod=1", // Use this for mode paramaters
'U_POST_ACTION' => "$url&amp;i=$id&amp;mode=post_details", // Use this for action parameters
'U_APPROVE_ACTION' => append_sid('mcp', "i=queue&amp;p=$post_id&amp;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&amp;i=main&amp;mode=post_details&amp;rdns=all")
);
phpbb::$template->assign_vars(array(
'U_LOOKUP_ALL' => "$url&amp;i=main&amp;mode=post_details&amp;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&amp;u=' . $user_id),
'U_SEARCHPOSTS' => append_sid('search', 'author_id=' . $user_id . '&amp;sr=topics'))
);
'U_SEARCHPOSTS' => append_sid('search', 'author_id=' . $user_id . '&amp;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&amp;i=$id&amp;mode=post_details&amp;rdns={$row['poster_ip']}#ip",
'U_WHOIS' => append_sid('mcp', "i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;ip={$row['poster_ip']}"))
);
'U_WHOIS' => append_sid('mcp', "i=$id&amp;mode=$mode&amp;action=whois&amp;p=$post_id&amp;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);
}
}

View File

@ -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'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
$topic_url = append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&amp;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&amp;p=$post_id&amp;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'] . '&amp;t=' . $row['topic_id']),
'U_VIEWFORUM' => (!$global_topic) ? append_sid('viewforum', 'f=' . $row['forum_id']) : '',
'U_VIEWPOST' => append_sid('viewtopic', 'f=' . $row['forum_id'] . '&amp;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');
}

View File

@ -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&amp;mode=report_details&amp;f=' . $post_info['forum_id'] . '&amp;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'] . '&amp;p=' . $row['post_id']) . '#p' . $row['post_id'],
'U_VIEW_DETAILS' => append_sid('mcp', "i=reports&amp;start=$start&amp;mode=report_details&amp;f={$row['forum_id']}&amp;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;

View File

@ -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&amp;i=$id&amp;p={$row['post_id']}&amp;mode=post_details" . (($forum_id) ? "&amp;f=$forum_id" : ''),
'U_MCP_APPROVE' => (phpbb::$acl->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid('mcp', 'i=queue&amp;mode=approve_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '',
'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;p=' . $row['post_id']) : '')
);
'U_MCP_REPORT' => (phpbb::$acl->acl_get('m_report', $topic_info['forum_id'])) ? append_sid('mcp', 'i=reports&amp;mode=report_details&amp;f=' . $topic_info['forum_id'] . '&amp;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'] . '&amp;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;
}

View File

@ -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&amp;form=mcp&amp;field=username&amp;select_single=true'),
'U_POST_ACTION' => append_sid('mcp', 'i=warn&amp;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&amp;mode=user_notes&amp;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&amp;mode=user_notes&amp;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&amp;mode=user_notes&amp;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'],

View File

@ -130,7 +130,7 @@ class ucp_attachments
$row_count = 0;
if ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_var('S_ATTACHMENT_ROWS', true);
phpbb::$template->assign_var('S_ATTACHMENT_ROWS', true);
do
{
@ -143,7 +143,7 @@ class ucp_attachments
$view_topic = append_sid('viewtopic', "t={$row['topic_id']}&amp;p={$row['post_msg_id']}") . "#p{$row['post_msg_id']}";
}
$template->assign_block_vars('attachrow', array(
phpbb::$template->assign_block_vars('attachrow', array(
'ROW_NUMBER' => $row_count + ($start + 1),
'FILENAME' => $row['real_filename'],
'COMMENT' => bbcode_nl2br($row['attach_comment']),
@ -160,8 +160,8 @@ class ucp_attachments
'S_IN_MESSAGE' => $row['in_message'],
'U_VIEW_ATTACHMENT' => append_sid('download/file', 'id=' . $row['attach_id']),
'U_VIEW_TOPIC' => $view_topic)
);
'U_VIEW_TOPIC' => $view_topic,
));
$row_count++;
}
@ -169,7 +169,7 @@ class ucp_attachments
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'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,
@ -188,8 +188,8 @@ class ucp_attachments
'S_DISPLAY_PAGINATION' => ($num_attachments) ? true : false,
'S_UCP_ACTION' => $this->u_action,
'S_SORT_OPTIONS' => $s_sort_key,
'S_ORDER_SELECT' => $s_sort_dir)
);
'S_ORDER_SELECT' => $s_sort_dir,
));
$this->tpl_name = 'ucp_attachments';
$this->page_title = 'UCP_ATTACHMENTS';

View File

@ -323,7 +323,7 @@ class ucp_groups
break;
}
$template->assign_block_vars($block, array(
phpbb::$template->assign_block_vars($block, array(
'GROUP_ID' => $row['group_id'],
'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $row['group_name']] : $row['group_name'],
'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : phpbb::$user->lang['GROUP_IS_SPECIAL'],
@ -333,8 +333,8 @@ class ucp_groups
'U_VIEW_GROUP' => append_sid('memberlist', 'mode=group&amp;g=' . $row['group_id']),
'S_GROUP_DEFAULT' => ($row['group_id'] == phpbb::$user->data['group_id']) ? true : false)
);
'S_GROUP_DEFAULT' => ($row['group_id'] == phpbb::$user->data['group_id']) ? true : false,
));
$group_id_ary[] = $row['group_id'];
}
@ -375,7 +375,7 @@ class ucp_groups
break;
}
$template->assign_block_vars('nonmember', array(
phpbb::$template->assign_block_vars('nonmember', array(
'GROUP_ID' => $row['group_id'],
'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $row['group_name']] : $row['group_name'],
'GROUP_DESC' => ($row['group_type'] <> GROUP_SPECIAL) ? generate_text_for_display($row['group_desc'], $row['group_desc_uid'], $row['group_desc_bitfield'], $row['group_desc_options']) : phpbb::$user->lang['GROUP_IS_SPECIAL'],
@ -385,20 +385,20 @@ class ucp_groups
'S_CAN_JOIN' => ($row['group_type'] == GROUP_OPEN || $row['group_type'] == GROUP_FREE) ? true : false,
'GROUP_COLOUR' => $row['group_colour'],
'U_VIEW_GROUP' => append_sid('memberlist', 'mode=group&amp;g=' . $row['group_id']))
);
'U_VIEW_GROUP' => append_sid('memberlist', 'mode=group&amp;g=' . $row['group_id']),
));
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CHANGE_DEFAULT' => (phpbb::$acl->acl_get('u_chggrp')) ? true : false,
'S_LEADER_COUNT' => $leader_count,
'S_MEMBER_COUNT' => $member_count,
'S_PENDING_COUNT' => $pending_count,
'S_NONMEMBER_COUNT' => $nonmember_count,
'S_UCP_ACTION' => $this->u_action)
);
'S_UCP_ACTION' => $this->u_action,
));
break;
@ -437,7 +437,7 @@ class ucp_groups
$avatar_img = (!empty($group_row['group_avatar'])) ? get_user_avatar($group_row['group_avatar'], $group_row['group_avatar_type'], $group_row['group_avatar_width'], $group_row['group_avatar_height'], 'GROUP_AVATAR') : '<img src="' . PHPBB_ROOT_PATH . phpbb::$base_config['admin_folder'] . '/images/no_avatar.gif" alt="" />';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $group_name] : $group_name,
'GROUP_INTERNAL_NAME' => $group_name,
'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '',
@ -675,7 +675,7 @@ class ucp_groups
$avatars_enabled = ($can_upload || (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote'])) ? true : false;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_EDIT' => true,
'S_INCLUDE_SWATCH' => true,
'S_CAN_UPLOAD' => $can_upload,
@ -749,7 +749,7 @@ class ucp_groups
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('leader', array(
phpbb::$template->assign_block_vars('leader', array(
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
@ -757,8 +757,8 @@ class ucp_groups
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
'JOINED' => ($row['user_regdate']) ? phpbb::$user->format_date($row['user_regdate']) : ' - ',
'USER_POSTS' => $row['user_posts'],
'USER_ID' => $row['user_id'])
);
'USER_ID' => $row['user_id'],
));
}
phpbb::$db->sql_freeresult($result);
@ -787,24 +787,24 @@ class ucp_groups
{
if ($row['user_pending'] && !$pending)
{
$template->assign_block_vars('member', array(
'S_PENDING' => true)
);
$template->assign_var('S_PENDING_SET', true);
phpbb::$template->assign_block_vars('member', array(
'S_PENDING' => true,
));
phpbb::$template->assign_var('S_PENDING_SET', true);
$pending = true;
}
else if (!$row['user_pending'] && !$approved)
{
$template->assign_block_vars('member', array(
'S_APPROVED' => true)
);
$template->assign_var('S_APPROVED_SET', true);
phpbb::$template->assign_block_vars('member', array(
'S_APPROVED' => true,
));
phpbb::$template->assign_var('S_APPROVED_SET', true);
$approved = true;
}
$template->assign_block_vars('member', array(
phpbb::$template->assign_block_vars('member', array(
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
@ -812,8 +812,8 @@ class ucp_groups
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
'JOINED' => ($row['user_regdate']) ? phpbb::$user->format_date($row['user_regdate']) : ' - ',
'USER_POSTS' => $row['user_posts'],
'USER_ID' => $row['user_id'])
);
'USER_ID' => $row['user_id'],
));
}
phpbb::$db->sql_freeresult($result);
@ -825,7 +825,7 @@ class ucp_groups
$s_action_options .= '<option value="' . $option . '">' . phpbb::$user->lang['GROUP_' . $lang] . '</option>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_LIST' => true,
'S_ACTION_OPTIONS' => $s_action_options,
'S_ON_PAGE' => on_page($total_members, phpbb::$config['topics_per_page'], $start),
@ -1061,7 +1061,7 @@ class ucp_groups
while ($value = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('leader', array(
phpbb::$template->assign_block_vars('leader', array(
'GROUP_NAME' => ($value['group_type'] == GROUP_SPECIAL) ? phpbb::$user->lang['G_' . $value['group_name']] : $value['group_name'],
'GROUP_DESC' => generate_text_for_display($value['group_desc'], $value['group_desc_uid'], $value['group_desc_bitfield'], $value['group_desc_options']),
'GROUP_TYPE' => $value['group_type'],
@ -1069,8 +1069,8 @@ class ucp_groups
'GROUP_COLOUR' => $value['group_colour'],
'U_LIST' => $this->u_action . "&amp;action=list&amp;g={$value['group_id']}",
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$value['group_id']}")
);
'U_EDIT' => $this->u_action . "&amp;action=edit&amp;g={$value['group_id']}",
));
}
phpbb::$db->sql_freeresult($result);

View File

@ -130,7 +130,7 @@ class ucp_main
$folder_img .= '_mine';
}
$template->assign_block_vars('topicrow', array(
phpbb::$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@ -157,8 +157,8 @@ class ucp_main
'U_LAST_POST' => append_sid('viewtopic', "f=$g_forum_id&amp;t=$topic_id&amp;p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_NEWEST_POST' => append_sid('viewtopic', "f=$g_forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
'U_VIEW_TOPIC' => append_sid('viewtopic', "f=$g_forum_id&amp;t=$topic_id"))
);
'U_VIEW_TOPIC' => append_sid('viewtopic', "f=$g_forum_id&amp;t=$topic_id"),
));
}
if (phpbb::$config['load_user_activity'])
@ -175,7 +175,7 @@ class ucp_main
$posts_per_day = phpbb::$user->data['user_posts'] / $memberdays;
$percentage = (phpbb::$config['num_posts']) ? min(100, (phpbb::$user->data['user_posts'] / phpbb::$config['num_posts']) * 100) : 0;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'USER_COLOR' => (!empty(phpbb::$user->data['user_colour'])) ? phpbb::$user->data['user_colour'] : '',
'JOINED' => phpbb::$user->format_date(phpbb::$user->data['user_regdate']),
'VISITED' => (empty($last_visit)) ? ' - ' : phpbb::$user->format_date($last_visit),
@ -330,7 +330,7 @@ class ucp_main
$last_post_time = $last_post_url = '';
}
$template->assign_block_vars('forumrow', array(
phpbb::$template->assign_block_vars('forumrow', array(
'FORUM_ID' => $forum_id,
'FORUM_FOLDER_IMG' => phpbb::$user->img($folder_image, $folder_alt),
'FORUM_FOLDER_IMG_SRC' => phpbb::$user->img($folder_image, $folder_alt, 'src'),
@ -347,8 +347,8 @@ class ucp_main
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST' => $last_post_url,
'U_VIEWFORUM' => append_sid('viewforum', 'f=' . $row['forum_id']))
);
'U_VIEWFORUM' => append_sid('viewforum', 'f=' . $row['forum_id']),
));
}
phpbb::$db->sql_freeresult($result);
}
@ -364,7 +364,7 @@ class ucp_main
$this->assign_topiclist('subscribed', $forbidden_forums);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_TOPIC_NOTIFY' => phpbb::$config['allow_topic_notify'],
'S_FORUM_NOTIFY' => phpbb::$config['allow_forum_notify'],
));
@ -375,9 +375,9 @@ class ucp_main
if (!phpbb::$config['allow_bookmarks'])
{
$template->assign_vars(array(
'S_NO_DISPLAY_BOOKMARKS' => true)
);
phpbb::$template->assign_vars(array(
'S_NO_DISPLAY_BOOKMARKS' => true,
));
break;
}
@ -427,7 +427,7 @@ class ucp_main
case 'drafts':
$pm_drafts = ($this->p_master->p_name == 'pm') ? true : false;
$template->assign_var('S_SHOW_DRAFTS', true);
phpbb::$template->assign_var('S_SHOW_DRAFTS', true);
phpbb::$user->add_lang('posting');
@ -491,12 +491,12 @@ class ucp_main
}
else
{
$template->assign_var('ERROR', ($draft_message == '') ? phpbb::$user->lang['EMPTY_DRAFT'] : (($draft_subject == '') ? phpbb::$user->lang['EMPTY_DRAFT_TITLE'] : ''));
phpbb::$template->assign_var('ERROR', ($draft_message == '') ? phpbb::$user->lang['EMPTY_DRAFT'] : (($draft_subject == '') ? phpbb::$user->lang['EMPTY_DRAFT_TITLE'] : ''));
}
}
else
{
$template->assign_var('ERROR', phpbb::$user->lang['FORM_INVALID']);
phpbb::$template->assign_var('ERROR', phpbb::$user->lang['FORM_INVALID']);
}
}
@ -547,7 +547,7 @@ class ucp_main
}
unset($topic_ids);
$template->assign_var('S_EDIT_DRAFT', $edit);
phpbb::$template->assign_var('S_EDIT_DRAFT', $edit);
$row_count = 0;
foreach ($draftrows as $draft)
@ -598,19 +598,19 @@ class ucp_main
);
$row_count++;
($edit) ? $template->assign_vars($template_row) : $template->assign_block_vars('draftrow', $template_row);
($edit) ? phpbb::$template->assign_vars($template_row) : phpbb::$template->assign_block_vars('draftrow', $template_row);
}
if (!$edit)
{
$template->assign_var('S_DRAFT_ROWS', $row_count);
phpbb::$template->assign_var('S_DRAFT_ROWS', $row_count);
}
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['UCP_MAIN_' . strtoupper($mode)],
'S_DISPLAY_MARK_ALL' => ($mode == 'watched' || ($mode == 'drafts' && !phpbb_request::is_set('edit', phpbb_request::GET))) ? true : false,
@ -653,11 +653,11 @@ class ucp_main
if ($topics_count)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'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) ? phpbb::$user->lang['VIEW_FORUM_TOPIC'] : sprintf(phpbb::$user->lang['VIEW_FORUM_TOPICS'], $topics_count))
);
'TOTAL_TOPICS' => ($topics_count == 1) ? phpbb::$user->lang['VIEW_FORUM_TOPIC'] : sprintf(phpbb::$user->lang['VIEW_FORUM_TOPICS'], $topics_count),
));
}
if ($mode == 'subscribed')
@ -775,7 +775,7 @@ class ucp_main
$view_topic_url = append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id");
// Send vars to template
$template->assign_block_vars('topicrow', array(
phpbb::$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'FIRST_POST_TIME' => phpbb::$user->format_date($row['topic_time']),

View File

@ -55,7 +55,7 @@ class ucp_pm
}
phpbb::$user->add_lang('posting');
$template->assign_var('S_PRIVMSGS', true);
phpbb::$template->assign_var('S_PRIVMSGS', true);
// Folder directly specified?
$folder_specified = request_var('folder', '');
@ -98,13 +98,13 @@ class ucp_pm
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MESSAGE' => $l_new_message,
'S_NOT_LOGGED_IN' => phpbb::$user->is_guest,
'CLICK_TO_VIEW' => sprintf(phpbb::$user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . append_sid('ucp', 'i=pm&amp;folder=inbox') . '" onclick="jump_to_inbox(this.href); return false;">', '</a>'),
'U_INBOX' => append_sid('ucp', 'i=pm&amp;folder=inbox'),
'UA_INBOX' => append_sid('ucp', 'i=pm&folder=inbox', false))
);
'UA_INBOX' => append_sid('ucp', 'i=pm&folder=inbox', false),
));
$tpl_file = 'ucp_pm_popup';
break;
@ -330,7 +330,7 @@ class ucp_pm
// Header for message view - folder and so on
$folder_status = get_folder_status($folder_id, $folder);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'CUR_FOLDER_ID' => $folder_id,
'CUR_FOLDER_NAME' => $folder_status['folder_name'],
'NUM_NOT_MOVED' => $num_not_moved,
@ -358,8 +358,8 @@ class ucp_pm
'FOLDER_MAX_MESSAGES' => $folder_status['max'],
'FOLDER_CUR_MESSAGES' => $folder_status['cur'],
'FOLDER_REMAINING_MESSAGES' => $folder_status['remaining'],
'FOLDER_PERCENT' => $folder_status['percent'])
);
'FOLDER_PERCENT' => $folder_status['percent'],
));
if ($action == 'view_folder')
{
@ -370,10 +370,10 @@ class ucp_pm
}
else if ($action == 'view_message')
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_VIEW_MESSAGE' => true,
'MSG_ID' => $msg_id)
);
'MSG_ID' => $msg_id,
));
if (!$msg_id)
{
@ -393,10 +393,10 @@ class ucp_pm
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['UCP_PM_' . strtoupper($mode)],
'S_UCP_ACTION' => $this->u_action . ((isset($action)) ? "&amp;action=$action" : ''))
);
'S_UCP_ACTION' => $this->u_action . ((isset($action)) ? "&amp;action=$action" : ''),
));
// Set desired template
$this->tpl_name = $tpl_file;

View File

@ -109,7 +109,7 @@ function compose_pm($id, $mode, $action)
phpbb::$db->sql_freeresult($result);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_PM_BOX' => true,
'S_ALLOW_MASS_PM' => (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm')) ? true : false,
'S_GROUP_OPTIONS' => (phpbb::$config['allow_mass_pm'] && phpbb::$acl->acl_get('u_masspm_group')) ? $group_options : '',
@ -366,7 +366,7 @@ function compose_pm($id, $mode, $action)
if ($action == 'post')
{
$template->assign_var('S_NEW_MESSAGE', true);
phpbb::$template->assign_var('S_NEW_MESSAGE', true);
}
if (!isset($icon_id))
@ -609,7 +609,7 @@ function compose_pm($id, $mode, $action)
$message_parser->message = $row['draft_message'];
$message_subject = $row['draft_subject'];
$template->assign_var('S_DRAFT_LOADED', true);
phpbb::$template->assign_var('S_DRAFT_LOADED', true);
}
else
{
@ -762,7 +762,7 @@ function compose_pm($id, $mode, $action)
// Attachment Preview
if (sizeof($message_parser->attachment_data))
{
$template->assign_var('S_HAS_ATTACHMENTS', true);
phpbb::$template->assign_var('S_HAS_ATTACHMENTS', true);
$update_count = array();
$attachment_data = $message_parser->attachment_data;
@ -771,9 +771,9 @@ function compose_pm($id, $mode, $action)
foreach ($attachment_data as $i => $attachment)
{
$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
phpbb::$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment,
));
}
unset($attachment_data);
}
@ -782,13 +782,13 @@ function compose_pm($id, $mode, $action)
if (!sizeof($error))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PREVIEW_SUBJECT' => $preview_subject,
'PREVIEW_MESSAGE' => $preview_message,
'PREVIEW_SIGNATURE' => $preview_signature,
'S_DISPLAY_PREVIEW' => true)
);
'S_DISPLAY_PREVIEW' => true,
));
}
unset($message_text);
}
@ -965,7 +965,7 @@ function compose_pm($id, $mode, $action)
));
}
$template->assign_block_vars($field . '_recipient', $tpl_ary);
phpbb::$template->assign_block_vars($field . '_recipient', $tpl_ary);
}
}
}
@ -1017,7 +1017,7 @@ function compose_pm($id, $mode, $action)
$form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !phpbb::$config['allow_pm_attach'] || !phpbb::$acl->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"';
// Start assigning vars for main posting page ...
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => phpbb::$user->lang['PM_ICON'],
'L_MESSAGE_BODY_EXPLAIN' => (intval(phpbb::$config['max_post_chars'])) ? sprintf(phpbb::$user->lang['MESSAGE_BODY_EXPLAIN'], intval(phpbb::$config['max_post_chars'])) : '',
@ -1076,7 +1076,7 @@ function compose_pm($id, $mode, $action)
{
if (message_history($msg_id, phpbb::$user->data['user_id'], $post, array(), true))
{
$template->assign_var('S_DISPLAY_HISTORY', true);
phpbb::$template->assign_var('S_DISPLAY_HISTORY', true);
}
}
}

View File

@ -463,7 +463,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FULL_FOLDER_OPTIONS' => $s_full_folder_options,
'S_TO_FOLDER_OPTIONS' => $s_to_folder_options,
'S_FOLDER_OPTIONS' => $s_folder_options,
@ -537,7 +537,7 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
if (!isset($global_rule_conditions[$rule_option]))
{
$cond_option = 'none';
$template->assign_var('NONE_CONDITION', true);
phpbb::$template->assign_var('NONE_CONDITION', true);
}
else
{
@ -567,13 +567,13 @@ function define_check_option($hardcoded, $check_option, $check_lang)
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CHECK_DEFINED' => true,
'S_CHECK_SELECT' => ($hardcoded) ? false : true,
'CHECK_CURRENT' => isset($check_lang[$check_option]) ? $check_lang[$check_option] : '',
'S_CHECK_OPTIONS' => $s_check_options,
'CHECK_OPTION' => $check_option)
);
'CHECK_OPTION' => $check_option,
));
}
/**
@ -612,13 +612,13 @@ function define_action_option($hardcoded, $action_option, $action_lang, $folder)
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_ACTION_DEFINED' => true,
'S_ACTION_SELECT' => ($hardcoded) ? false : true,
'ACTION_CURRENT' => $l_action,
'S_ACTION_OPTIONS' => $s_action_options,
'ACTION_OPTION' => $action_option)
);
'ACTION_OPTION' => $action_option,
));
}
/**
@ -635,13 +635,13 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_RULE_DEFINED' => true,
'S_RULE_SELECT' => !$hardcoded,
'RULE_CURRENT' => isset($rule_lang[$rule_option]) ? $rule_lang[$rule_option] : '',
'S_RULE_OPTIONS' => $s_rule_options,
'RULE_OPTION' => $rule_option)
);
'RULE_OPTION' => $rule_option,
));
}
/**
@ -649,18 +649,18 @@ function define_rule_option($hardcoded, $rule_option, $rule_lang, $check_ary)
*/
function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule_conditions)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_COND_DEFINED' => true,
'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false)
);
'S_COND_SELECT' => (!$hardcoded && isset($global_rule_conditions[$rule_option])) ? true : false,
));
// Define COND_OPTION
if (!isset($global_rule_conditions[$rule_option]))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'COND_OPTION' => 'none',
'COND_CURRENT' => false)
);
'COND_CURRENT' => false,
));
return;
}
@ -673,12 +673,12 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
case 'text':
$rule_string = utf8_normalize_nfc(request_var('rule_string', '', true));
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_TEXT_CONDITION' => true,
'CURRENT_STRING' => $rule_string,
'CURRENT_USER_ID' => 0,
'CURRENT_GROUP_ID' => 0)
);
'CURRENT_GROUP_ID' => 0,
));
$current_value = $rule_string;
break;
@ -716,12 +716,12 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_USER_CONDITION' => true,
'CURRENT_STRING' => $rule_string,
'CURRENT_USER_ID' => $rule_user_id,
'CURRENT_GROUP_ID' => 0)
);
'CURRENT_GROUP_ID' => 0,
));
$current_value = $rule_string;
break;
@ -769,13 +769,13 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_GROUP_CONDITION' => true,
'S_GROUP_OPTIONS' => $s_group_options,
'CURRENT_STRING' => $rule_string,
'CURRENT_USER_ID' => 0,
'CURRENT_GROUP_ID' => $rule_group_id)
);
'CURRENT_GROUP_ID' => $rule_group_id,
));
$current_value = $rule_string;
break;
@ -784,10 +784,10 @@ function define_cond_option($hardcoded, $cond_option, $rule_option, $global_rule
return;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'COND_OPTION' => $condition,
'COND_CURRENT' => $current_value)
);
'COND_CURRENT' => $current_value,
));
}
/**
@ -804,15 +804,15 @@ function show_defined_rules($user_id, $check_lang, $rule_lang, $action_lang, $fo
$count = 0;
while ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_block_vars('rule', array(
phpbb::$template->assign_block_vars('rule', array(
'COUNT' => ++$count,
'RULE_ID' => $row['rule_id'],
'CHECK' => $check_lang[$row['rule_check']],
'RULE' => $rule_lang[$row['rule_connection']],
'STRING' => $row['rule_string'],
'ACTION' => $action_lang[$row['rule_action']],
'FOLDER' => ($row['rule_action'] == ACTION_PLACE_INTO_FOLDER) ? $folder[$row['rule_folder_id']]['folder_name'] : '')
);
'FOLDER' => ($row['rule_action'] == ACTION_PLACE_INTO_FOLDER) ? $folder[$row['rule_folder_id']]['folder_name'] : '',
));
}
phpbb::$db->sql_freeresult($result);
}

View File

@ -53,11 +53,11 @@ function view_folder($id, $mode, $folder_id, $folder)
foreach ($color_rows as $var)
{
$template->assign_block_vars('pm_colour_info', array(
phpbb::$template->assign_block_vars('pm_colour_info', array(
'IMG' => phpbb::$user->img("pm_{$var}", ''),
'CLASS' => "pm_{$var}_colour",
'LANG' => phpbb::$user->lang[strtoupper($var) . '_MESSAGE'])
);
'LANG' => phpbb::$user->lang[strtoupper($var) . '_MESSAGE'],
));
}
$mark_options = array('mark_important', 'delete_marked');
@ -99,10 +99,10 @@ function view_folder($id, $mode, $folder_id, $folder)
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_MARK_OPTIONS' => $s_mark_options,
'S_MOVE_MARKED_OPTIONS' => $s_folder_move_options)
);
'S_MOVE_MARKED_OPTIONS' => $s_folder_move_options,
));
// Okay, lets dump out the page ...
if (sizeof($folder_info['pm_list']))
@ -212,7 +212,7 @@ function view_folder($id, $mode, $folder_id, $folder)
}
// Send vars to template
$template->assign_block_vars('messagerow', array(
phpbb::$template->assign_block_vars('messagerow', array(
'PM_CLASS' => ($row_indicator) ? 'pm_' . $row_indicator . '_colour' : '',
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
@ -238,17 +238,17 @@ function view_folder($id, $mode, $folder_id, $folder)
'U_VIEW_PM' => ($row['pm_deleted']) ? '' : $view_message_url,
'U_REMOVE_PM' => ($row['pm_deleted']) ? $remove_message_url : '',
'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '')
);
'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '',
));
}
unset($folder_info['rowset']);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? true : false,
'S_SHOW_COLOUR_LEGEND' => true,
'S_PM_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false)
);
'S_PM_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false,
));
}
}
else
@ -259,7 +259,7 @@ function view_folder($id, $mode, $folder_id, $folder)
if ($export_type == 'CSV' && ($delimiter === '' || $enclosure === ''))
{
$template->assign_var('PROMPT', true);
phpbb::$template->assign_var('PROMPT', true);
}
else
{
@ -492,7 +492,7 @@ function get_pm_from($folder_id, $folder, $user_id)
$sql_limit_time = '';
}
$template->assign_vars(array(
phpbb::$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, phpbb::$config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($pm_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_MESSAGES' => (($pm_count == 1) ? phpbb::$user->lang['VIEW_PM_MESSAGE'] : sprintf(phpbb::$user->lang['VIEW_PM_MESSAGES'], $pm_count)),
@ -507,8 +507,8 @@ function get_pm_from($folder_id, $folder, $user_id)
'S_TOPIC_ICONS' => (phpbb::$config['enable_pm_icons']) ? true : false,
'U_POST_NEW_TOPIC' => (phpbb::$acl->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" : '')))
);
'S_PM_ACTION' => append_sid('ucp', "i=pm&amp;mode=view&amp;action=view_folder&amp;f=$folder_id" . (($start !== 0) ? "&amp;start=$start" : '')),
));
// Grab all pm data
$rowset = $pm_list = array();

View File

@ -167,7 +167,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$url = append_sid('ucp', 'i=pm');
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@ -220,17 +220,17 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'U_PRINT_PM' => (phpbb::$config['print_pm'] && phpbb::$acl->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'] && phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')
);
'U_FORWARD_PM' => (phpbb::$config['forward_pm'] && phpbb::$acl->acl_get('u_sendpm') && phpbb::$acl->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. ;)
if (isset($attachments) && sizeof($attachments))
{
foreach ($attachments as $attachment)
{
$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
phpbb::$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment,
));
}
}
@ -239,7 +239,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
// Message History
if (message_history($msg_id, phpbb::$user->data['user_id'], $message_row, $folder))
{
$template->assign_var('S_DISPLAY_HISTORY', true);
phpbb::$template->assign_var('S_DISPLAY_HISTORY', true);
}
}
}

View File

@ -125,7 +125,7 @@ class ucp_prefs
}
$dateformat_options .= '>' . phpbb::$user->lang['CUSTOM_DATEFORMAT'] . '</option>';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false,
@ -150,8 +150,8 @@ class ucp_prefs
'S_STYLE_OPTIONS' => (phpbb::$config['override_user_style']) ? '' : style_select($data['style']),
'S_TZ_OPTIONS' => tz_select($data['tz'], true),
'S_CAN_HIDE_ONLINE' => (phpbb::$acl->acl_get('u_hideonline')) ? true : false,
'S_SELECT_NOTIFY' => (phpbb::$config['jab_enable'] && phpbb::$user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);
'S_SELECT_NOTIFY' => (phpbb::$config['jab_enable'] && phpbb::$user->data['user_jabber'] && @extension_loaded('xml')) ? true : false,
));
break;
@ -270,7 +270,7 @@ class ucp_prefs
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'S_IMAGES' => $data['images'],
@ -287,8 +287,8 @@ class ucp_prefs
'S_TOPIC_SORT_DIR' => $s_sort_topic_dir,
'S_POST_SORT_DAYS' => $s_limit_post_days,
'S_POST_SORT_KEY' => $s_sort_post_key,
'S_POST_SORT_DIR' => $s_sort_post_dir)
);
'S_POST_SORT_DIR' => $s_sort_post_dir,
));
break;
@ -331,21 +331,21 @@ class ucp_prefs
trigger_error($message);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_BBCODE' => $data['bbcode'],
'S_SMILIES' => $data['smilies'],
'S_SIG' => $data['sig'],
'S_NOTIFY' => $data['notify'])
);
'S_NOTIFY' => $data['notify'],
));
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['UCP_PREFS_' . strtoupper($mode)],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => $this->u_action)
);
'S_UCP_ACTION' => $this->u_action,
));
$this->tpl_name = 'ucp_prefs_' . $mode;
$this->page_title = 'UCP_PREFS_' . strtoupper($mode);

View File

@ -242,7 +242,7 @@ class ucp_profile
$error = preg_replace('#^([A-Z_]+)$#e', "phpbb::\$user->lang('\\1')", $error);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'USERNAME' => $data['username'],
@ -257,8 +257,8 @@ class ucp_profile
'S_FORCE_PASSWORD' => (phpbb::$acl->acl_get('u_chgpasswd') && phpbb::$config['chg_passforce'] && phpbb::$user->data['user_passchg'] < time() - (phpbb::$config['chg_passforce'] * 86400)) ? true : false,
'S_CHANGE_USERNAME' => (phpbb::$config['allow_namechange'] && phpbb::$acl->acl_get('u_chgname')) ? true : false,
'S_CHANGE_EMAIL' => (phpbb::$acl->acl_get('u_chgemail')) ? true : false,
'S_CHANGE_PASSWORD' => (phpbb::$acl->acl_get('u_chgpasswd')) ? true : false)
);
'S_CHANGE_PASSWORD' => (phpbb::$acl->acl_get('u_chgpasswd')) ? true : false,
));
break;
case 'profile_info':
@ -433,7 +433,7 @@ class ucp_profile
}
unset($now);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
@ -441,7 +441,7 @@ class ucp_profile
));
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'ICQ' => $data['icq'],
@ -533,7 +533,7 @@ class ucp_profile
decode_message($signature, phpbb::$user->data['user_sig_bbcode_uid']);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'SIGNATURE' => $signature,
'SIGNATURE_PREVIEW' => $signature_preview,
@ -554,8 +554,8 @@ class ucp_profile
'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)
);
'S_LINKS_ALLOWED' => (phpbb::$config['allow_sig_links']) ? true : false,
));
// Build custom bbcodes array
display_custom_bbcodes();
@ -593,7 +593,7 @@ class ucp_profile
$error = preg_replace('#^([A-Z_]+)$#e', "phpbb::\$user->lang('\\1')", $error);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'AVATAR' => get_user_avatar(phpbb::$user->data['user_avatar'], phpbb::$user->data['user_avatar_type'], phpbb::$user->data['user_avatar_width'], phpbb::$user->data['user_avatar_height']),
'AVATAR_SIZE' => phpbb::$config['avatar_filesize'],
@ -613,7 +613,7 @@ class ucp_profile
{
$avatars_enabled = ($can_upload || (phpbb::$acl->acl_get('u_chgavatar') && (phpbb::$config['allow_avatar_local'] || phpbb::$config['allow_avatar_remote']))) ? true : false;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'AVATAR_WIDTH' => request_var('width', phpbb::$user->data['user_avatar_width']),
'AVATAR_HEIGHT' => request_var('height', phpbb::$user->data['user_avatar_height']),
@ -621,19 +621,19 @@ class ucp_profile
'S_UPLOAD_AVATAR_FILE' => $can_upload,
'S_UPLOAD_AVATAR_URL' => $can_upload,
'S_LINK_AVATAR' => (phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_remote']) ? true : false,
'S_DISPLAY_GALLERY' => (phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local']) ? true : false)
);
'S_DISPLAY_GALLERY' => (phpbb::$acl->acl_get('u_chgavatar') && phpbb::$config['allow_avatar_local']) ? true : false,
));
}
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['UCP_PROFILE_' . strtoupper($mode)],
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => $this->u_action)
);
'S_UCP_ACTION' => $this->u_action,
));
// Set desired template
$this->tpl_name = 'ucp_profile_' . $mode;

View File

@ -119,7 +119,7 @@ class ucp_register
$coppa_birthday = phpbb::$user->format_date(mktime($now['hours'] + phpbb::$user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), phpbb::$user->lang['DATE_FORMAT']);
unset($now);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_COPPA_NO' => sprintf(phpbb::$user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
'L_COPPA_YES' => sprintf(phpbb::$user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
@ -133,15 +133,14 @@ class ucp_register
}
else
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TERMS_OF_USE' => sprintf(phpbb::$user->lang['TERMS_OF_USE_CONTENT'], phpbb::$config['sitename'], generate_board_url()),
'S_SHOW_COPPA' => false,
'S_REGISTRATION' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
'S_UCP_ACTION' => append_sid('ucp', 'mode=register' . $add_lang . $add_coppa),
)
);
));
}
$this->tpl_name = 'ucp_agreement';
@ -434,7 +433,7 @@ class ucp_register
$str = '';
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_CONFIRM_EXPLAIN' => sprintf(phpbb::$user->lang['CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlspecialchars(phpbb::$config['board_contact']) . '">', '</a>'),
'S_CAPTCHA' => $captcha->get_template(),
));
@ -453,7 +452,7 @@ class ucp_register
break;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
@ -470,8 +469,7 @@ class ucp_register
'S_COPPA' => $coppa,
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => append_sid('ucp', 'mode=register'),
)
);
));
//
phpbb::$user->profile_fields = array();

View File

@ -108,7 +108,7 @@ class ucp_remind
trigger_error($message);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'S_PROFILE_ACTION' => append_sid('ucp', 'mode=sendpassword'),

View File

@ -148,7 +148,7 @@ class ucp_resend
trigger_error($message);
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'USERNAME' => $username,
'EMAIL' => $email,
'S_PROFILE_ACTION' => append_sid('ucp', 'mode=resend_act'),

View File

@ -202,7 +202,7 @@ class ucp_zebra
}
else
{
$template->assign_var('ERROR', implode('<br />', $error));
phpbb::$template->assign_var('ERROR', implode('<br />', $error));
}
}
else
@ -233,7 +233,7 @@ class ucp_zebra
}
phpbb::$db->sql_freeresult($result);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_TITLE' => phpbb::$user->lang['UCP_ZEBRA_' . $l_mode],
'U_FIND_USERNAME' => append_sid('memberlist', 'mode=searchuser&amp;form=ucp&amp;field=add'),

View File

@ -334,7 +334,7 @@ if ($mode == 'bump')
// Subject length limiting to 60 characters if first post...
if ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_data['post_id']))
{
$template->assign_var('S_NEW_MESSAGE', true);
phpbb::$template->assign_var('S_NEW_MESSAGE', true);
}
// Determine some vars
@ -556,7 +556,7 @@ if ($draft_id && ($mode == 'reply' || $mode == 'quote' || $mode == 'post') && ph
$post_data['post_subject'] = $row['draft_subject'];
$message_parser->message = $row['draft_message'];
$template->assign_var('S_DRAFT_LOADED', true);
phpbb::$template->assign_var('S_DRAFT_LOADED', true);
}
else
{
@ -667,7 +667,7 @@ if ($submit || $preview || $refresh)
{
if (topic_review($topic_id, $forum_id, 'post_review', $post_data['topic_cur_post_id']))
{
$template->assign_var('S_POST_REVIEW', true);
phpbb::$template->assign_var('S_POST_REVIEW', true);
}
$submit = false;
@ -893,10 +893,10 @@ if ($submit || $preview || $refresh)
{
include_once(PHPBB_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true),
'S_UNGLOBALISE' => true)
);
'S_UNGLOBALISE' => true,
));
$submit = false;
$refresh = true;
@ -1066,15 +1066,15 @@ if (!sizeof($error) && $preview)
$poll_end = ($post_data['poll_length'] * 86400) + (($post_data['poll_start']) ? $post_data['poll_start'] : time());
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_HAS_POLL_OPTIONS' => (sizeof($post_data['poll_options'])),
'S_IS_MULTI_CHOICE' => ($post_data['poll_max_options'] > 1) ? true : false,
'POLL_QUESTION' => $parse_poll->message,
'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf(phpbb::$user->lang['POLL_RUN_TILL'], phpbb::$user->format_date($poll_end)) : '',
'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? phpbb::$user->lang['MAX_OPTION_SELECT'] : sprintf(phpbb::$user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
);
'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? phpbb::$user->lang['MAX_OPTION_SELECT'] : sprintf(phpbb::$user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']),
));
$parse_poll->message = implode("\n", $post_data['poll_options']);
$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
@ -1083,10 +1083,10 @@ if (!sizeof($error) && $preview)
foreach ($preview_poll_options as $key => $option)
{
$template->assign_block_vars('poll_option', array(
phpbb::$template->assign_block_vars('poll_option', array(
'POLL_OPTION_CAPTION' => $option,
'POLL_OPTION_ID' => $key + 1)
);
'POLL_OPTION_ID' => $key + 1,
));
}
unset($preview_poll_options);
}
@ -1094,7 +1094,7 @@ if (!sizeof($error) && $preview)
// Attachment Preview
if (sizeof($message_parser->attachment_data))
{
$template->assign_var('S_HAS_ATTACHMENTS', true);
phpbb::$template->assign_var('S_HAS_ATTACHMENTS', true);
$update_count = array();
$attachment_data = $message_parser->attachment_data;
@ -1103,22 +1103,22 @@ if (!sizeof($error) && $preview)
foreach ($attachment_data as $i => $attachment)
{
$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment)
);
phpbb::$template->assign_block_vars('attachment', array(
'DISPLAY_ATTACHMENT' => $attachment,
));
}
unset($attachment_data);
}
if (!sizeof($error))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PREVIEW_SUBJECT' => $preview_subject,
'PREVIEW_MESSAGE' => $preview_message,
'PREVIEW_SIGNATURE' => $preview_signature,
'S_DISPLAY_PREVIEW' => true)
);
'S_DISPLAY_PREVIEW' => true,
));
}
}
@ -1222,7 +1222,7 @@ if (phpbb::$config['enable_post_confirm'] && !phpbb::$user->is_registered && $so
{
$captcha->reset();
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_CONFIRM_CODE' => true,
'CONFIRM' => $captcha->get_template(),
));
@ -1243,7 +1243,7 @@ add_form_key('posting');
// Start assigning vars for main posting page ...
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'L_POST_A' => $page_title,
'L_ICON' => ($mode == 'reply' || $mode == 'quote' || ($mode == 'edit' && $post_id != $post_data['topic_first_post_id'])) ? phpbb::$user->lang['POST_ICON'] : phpbb::$user->lang['TOPIC_ICON'],
'L_MESSAGE_BODY_EXPLAIN' => (intval(phpbb::$config['max_post_chars'])) ? sprintf(phpbb::$user->lang['MESSAGE_BODY_EXPLAIN'], intval(phpbb::$config['max_post_chars'])) : '',
@ -1302,8 +1302,8 @@ $template->assign_vars(array(
'S_BBCODE_QUOTE' => $quote_status,
'S_POST_ACTION' => $s_action,
'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
'S_HIDDEN_FIELDS' => $s_hidden_fields,
));
// Build custom bbcodes array
display_custom_bbcodes();
@ -1312,7 +1312,7 @@ display_custom_bbcodes();
if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_post_id']/* && (!$post_data['poll_last_vote'] || phpbb::$acl->acl_get('m_edit', $forum_id))*/))
&& phpbb::$acl->acl_get('f_poll', $forum_id))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SHOW_POLL_BOX' => true,
'S_POLL_VOTE_CHANGE' => (phpbb::$acl->acl_get('f_votechg', $forum_id)),
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == phpbb::$user->data['user_id'] && phpbb::$acl->acl_get('f_delete', $forum_id)) || phpbb::$acl->acl_get('m_delete', $forum_id))),
@ -1324,8 +1324,8 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
// 'POLL_TITLE' => (isset($post_data['poll_title'])) ? $post_data['poll_title'] : '',
'POLL_OPTIONS' => (!empty($post_data['poll_options'])) ? implode("\n", $post_data['poll_options']) : '',
'POLL_MAX_OPTIONS' => (isset($post_data['poll_max_options'])) ? (int) $post_data['poll_max_options'] : 1,
'POLL_LENGTH' => $post_data['poll_length'])
);
'POLL_LENGTH' => $post_data['poll_length'],
));
}
// Show attachment box for adding attachments if true
@ -1337,9 +1337,9 @@ posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
// Output page ...
page_header($page_title);
$template->set_filenames(array(
'body' => 'posting_body.html')
);
phpbb::$template->set_filenames(array(
'body' => 'posting_body.html',
));
make_jumpbox(append_sid('viewforum'));
@ -1348,7 +1348,7 @@ if ($mode == 'reply' || $mode == 'quote')
{
if (topic_review($topic_id, $forum_id))
{
$template->assign_var('S_DISPLAY_REVIEW', true);
phpbb::$template->assign_var('S_DISPLAY_REVIEW', true);
}
}
@ -1363,15 +1363,15 @@ function upload_popup($forum_style = 0)
page_header(phpbb::$user->lang['PROGRESS_BAR']);
$template->set_filenames(array(
'popup' => 'posting_progress_bar.html')
);
phpbb::$template->set_filenames(array(
'popup' => 'posting_progress_bar.html',
));
$template->assign_vars(array(
'PROGRESS_BAR' => phpbb::$user->img('upload_bar', 'UPLOAD_IN_PROGRESS'))
);
phpbb::$template->assign_vars(array(
'PROGRESS_BAR' => phpbb::$user->img('upload_bar', 'UPLOAD_IN_PROGRESS'),
));
$template->display('popup');
phpbb::$template->display('popup');
garbage_collection();
exit_handler();

View File

@ -146,22 +146,22 @@ if ($submit && $reason_id)
// Generate the reasons
display_reasons($reason_id);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'REPORT_TEXT' => $report_text,
'S_REPORT_ACTION' => append_sid('report', 'f=' . $forum_id . '&amp;p=' . $post_id),
'S_NOTIFY' => $user_notify,
'S_CAN_NOTIFY' => (phpbb::$user->is_registered) ? true : false)
);
'S_CAN_NOTIFY' => (phpbb::$user->is_registered) ? true : false,
));
generate_forum_nav($forum_data);
// Start output of page
page_header(phpbb::$user->lang['REPORT_POST']);
$template->set_filenames(array(
'body' => 'report_body.html')
);
phpbb::$template->set_filenames(array(
'body' => 'report_body.html',
));
page_footer();

View File

@ -50,14 +50,14 @@ $search_forum = request_var('fid', array(0));
// Is user able to search? Has search been disabled?
if (!phpbb::$acl->acl_get('u_search') || !phpbb::$acl->acl_getf_global('f_search') || !phpbb::$config['load_search'])
{
$template->assign_var('S_NO_SEARCH', true);
phpbb::$template->assign_var('S_NO_SEARCH', true);
trigger_error('NO_SEARCH');
}
// Check search load limit
if (phpbb::$user->system['load'] && phpbb::$config['limit_search_load'] && (phpbb::$user->system['load'] > doubleval(phpbb::$config['limit_search_load'])))
{
$template->assign_var('S_NO_SEARCH', true);
phpbb::$template->assign_var('S_NO_SEARCH', true);
trigger_error('NO_SEARCH_TIME');
}
@ -67,7 +67,7 @@ if ($interval && !phpbb::$acl->acl_get('u_ignoreflood'))
{
if (phpbb::$user->data['user_last_search'] > time() - $interval)
{
$template->assign_var('S_NO_SEARCH', true);
phpbb::$template->assign_var('S_NO_SEARCH', true);
trigger_error('NO_SEARCH_TIME');
}
}
@ -485,7 +485,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_search .= ($search_fields != 'all') ? '&amp;sf=' . $search_fields : '';
$u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'SEARCH_TITLE' => $l_search_title,
'SEARCH_MATCHES' => $l_search_matches,
'SEARCH_WORDS' => $search->search_query,
@ -837,11 +837,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
{
if ((isset($zebra['foe']) && in_array($row['poster_id'], $zebra['foe'])) && (!$view || $view != 'show' || $post_id != $row['post_id']))
{
$template->assign_block_vars('searchresults', array(
phpbb::$template->assign_block_vars('searchresults', array(
'S_IGNORE_POST' => true,
'L_IGNORE_POST' => sprintf(phpbb::$user->lang['POST_BY_FOE'], $row['username'], "<a href=\"$u_search&amp;start=$start&amp;p=" . $row['post_id'] . '&amp;view=show#p' . $row['post_id'] . '">', '</a>'))
);
'L_IGNORE_POST' => sprintf(phpbb::$user->lang['POST_BY_FOE'], $row['username'], "<a href=\"$u_search&amp;start=$start&amp;p=" . $row['post_id'] . '&amp;view=show#p' . $row['post_id'] . '">', '</a>'),
));
continue;
}
@ -894,7 +894,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
);
}
$template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
phpbb::$template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $result_topic_id,
'POST_ID' => ($show_results == 'posts') ? $row['post_id'] : false,
@ -912,7 +912,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($topic_id && ($topic_id == $result_topic_id))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'SEARCH_TOPIC' => $topic_title,
'U_SEARCH_TOPIC' => $view_topic_url
));
@ -922,9 +922,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
page_header(($l_search_title) ? $l_search_title : phpbb::$user->lang['SEARCH']);
$template->set_filenames(array(
'body' => 'search_results.html')
);
phpbb::$template->set_filenames(array(
'body' => 'search_results.html',
));
make_jumpbox(append_sid('viewforum'));
page_footer();
@ -1058,7 +1058,7 @@ if (!empty($_EXTRA_URL))
}
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_SEARCH_ACTION' => append_sid('search', false, true, 0), // We force no ?sid= appending by using 0
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
'S_CHARACTER_OPTIONS' => $s_characters,
@ -1082,7 +1082,7 @@ if (phpbb::$acl->acl_get('a_search'))
{
$keywords = $row['search_keywords'];
$template->assign_block_vars('recentsearch', array(
phpbb::$template->assign_block_vars('recentsearch', array(
'KEYWORDS' => $keywords,
'TIME' => phpbb::$user->format_date($row['search_time']),
@ -1095,9 +1095,9 @@ if (phpbb::$acl->acl_get('a_search'))
// Output the basic page
page_header(phpbb::$user->lang['SEARCH']);
$template->set_filenames(array(
'body' => 'search_body.html')
);
phpbb::$template->set_filenames(array(
'body' => 'search_body.html',
));
make_jumpbox(append_sid('viewforum'));
page_footer();

View File

@ -114,20 +114,20 @@ switch ($mode)
login_box();
}
$template->set_filenames(array(
'body' => 'ucp_agreement.html')
);
phpbb::$template->set_filenames(array(
'body' => 'ucp_agreement.html',
));
// Disable online list
page_header(phpbb::$user->lang[$title], false);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_AGREEMENT' => true,
'AGREEMENT_TITLE' => phpbb::$user->lang[$title],
'AGREEMENT_TEXT' => sprintf(phpbb::$user->lang[$message], phpbb::$config['sitename'], generate_board_url()),
'U_BACK' => append_sid('ucp', 'mode=login'),
'L_BACK' => phpbb::$user->lang['BACK_TO_LOGIN'])
);
'L_BACK' => phpbb::$user->lang['BACK_TO_LOGIN'],
));
page_footer();
@ -314,14 +314,14 @@ function _display_friends()
{
$which = (time() - $update_time < $row['online_time'] && ($row['viewonline'] || phpbb::$acl->acl_get('u_viewonline'))) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array(
phpbb::$template->assign_block_vars("friends_{$which}", array(
'USER_ID' => $row['user_id'],
'U_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
'USER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
);
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
));
}
phpbb::$db->sql_freeresult($result);
}
@ -331,16 +331,16 @@ function _display_friends()
*/
function _module_zebra($mode, &$module_row)
{
$template->assign_var('S_ZEBRA_ENABLED', true);
phpbb::$template->assign_var('S_ZEBRA_ENABLED', true);
if ($mode == 'friends')
{
$template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
phpbb::$template->assign_var('S_ZEBRA_FRIENDS_ENABLED', true);
}
if ($mode == 'foes')
{
$template->assign_var('S_ZEBRA_FOES_ENABLED', true);
phpbb::$template->assign_var('S_ZEBRA_FOES_ENABLED', true);
}
}

View File

@ -134,20 +134,20 @@ if ($forum_data['left_id'] != $forum_data['right_id'] - 1)
}
else
{
$template->assign_var('S_HAS_SUBFORUM', false);
phpbb::$template->assign_var('S_HAS_SUBFORUM', false);
get_moderators($moderators, $forum_id);
}
// Dump out the page header and load viewforum template
page_header(phpbb::$user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name']);
$template->set_filenames(array(
'body' => 'viewforum_body.html')
);
phpbb::$template->set_filenames(array(
'body' => 'viewforum_body.html',
));
make_jumpbox(append_sid('viewforum'), $forum_id);
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_VIEW_FORUM' => append_sid('viewforum', "f=$forum_id&amp;start=$start"),
));
@ -161,7 +161,7 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] &
// We also make this circumstance available to the template in case we want to display a notice. ;)
if (!phpbb::$acl->acl_get('f_read', $forum_id))
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'S_NO_READ_ACCESS' => true,
'S_AUTOLOGIN_ENABLED' => (phpbb::$config['allow_autologin']) ? true : false,
'S_LOGIN_ACTION' => append_sid('ucp', 'mode=login') . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url(array('_f_')))),
@ -193,7 +193,7 @@ if ($forum_data['forum_topics_per_page'])
// Do the forum Prune thang - cron type job ...
if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
{
$template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid('cron', 'cron_type=prune_forum&amp;f=' . $forum_id) . '" alt="cron" width="1" height="1" />');
phpbb::$template->assign_var('RUN_CRON_TASK', '<img src="' . append_sid('cron', 'cron_type=prune_forum&amp;f=' . $forum_id) . '" alt="cron" width="1" height="1" />');
}
// Forum rules and subscription info
@ -245,7 +245,7 @@ if ($sort_days)
$sql_limit_time = "AND t.topic_last_post_time >= $min_post_time";
// Make sure we have information about day selection ready
$template->assign_var('S_SORT_DAYS', true);
phpbb::$template->assign_var('S_SORT_DAYS', true);
}
else
{
@ -265,7 +265,7 @@ $post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? phpbb::$user->lang['F
// Display active topics?
$s_display_active = ($forum_data['forum_type'] == FORUM_CAT && ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'MODERATORS' => (!empty($moderators[$forum_id])) ? implode(', ', $moderators[$forum_id]) : '',
'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? phpbb::$user->img('button_topic_locked', $post_alt) : phpbb::$user->img('button_topic_new', $post_alt),
@ -523,11 +523,11 @@ if ($s_display_active)
$topics_count = 1;
}
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'PAGINATION' => generate_pagination(append_sid('viewforum', "f=$forum_id" . ((strlen($u_sort_param)) ? "&amp;$u_sort_param" : '')), $topics_count, phpbb::$config['topics_per_page'], $start),
'PAGE_NUMBER' => on_page($topics_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? phpbb::$user->lang['VIEW_FORUM_TOPIC'] : sprintf(phpbb::$user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
);
'TOTAL_TOPICS' => ($s_display_active) ? false : (($topics_count == 1) ? phpbb::$user->lang['VIEW_FORUM_TOPIC'] : sprintf(phpbb::$user->lang['VIEW_FORUM_TOPICS'], $topics_count)),
));
$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
$topic_tracking_info = $tracking_topics = array();
@ -619,7 +619,7 @@ if (sizeof($topic_list))
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid('mcp', 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, phpbb::$user->session_id) : '';
// Send vars to template
$template->assign_block_vars('topicrow', array(
phpbb::$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@ -672,8 +672,8 @@ if (sizeof($topic_list))
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&amp;mode=reports&amp;f=' . $forum_id . '&amp;t=' . $topic_id, true, phpbb::$user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
);
'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
));
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;

View File

@ -64,16 +64,16 @@ if ($mode == 'whois' && phpbb::$acl->acl_get('a_') && $session_id)
if ($row = phpbb::$db->sql_fetchrow($result))
{
$template->assign_var('WHOIS', user_ipwhois($row['session_ip']));
phpbb::$template->assign_var('WHOIS', user_ipwhois($row['session_ip']));
}
phpbb::$db->sql_freeresult($result);
// Output the page
page_header(phpbb::$user->lang['WHO_IS_ONLINE']);
$template->set_filenames(array(
'body' => 'viewonline_whois.html')
);
phpbb::$template->set_filenames(array(
'body' => 'viewonline_whois.html',
));
make_jumpbox(append_sid('viewforum'));
page_footer();
@ -321,7 +321,7 @@ while ($row = phpbb::$db->sql_fetchrow($result))
break;
}
$template->assign_block_vars('user_row', array(
phpbb::$template->assign_block_vars('user_row', array(
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
'USERNAME_FULL' => $username_full,
@ -413,7 +413,7 @@ phpbb::$db->sql_freeresult($result);
meta_refresh(60, append_sid('viewonline', "sg=$show_guests&amp;sk=$sort_key&amp;sd=$sort_dir&amp;start=$start"));
// Send data to template
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $logged_visible_online) . sprintf($l_h_user_s, $logged_hidden_online),
'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_counter),
'LEGEND' => $legend,
@ -426,8 +426,8 @@ $template->assign_vars(array(
'U_SWITCH_GUEST_DISPLAY' => append_sid('viewonline', 'sg=' . ((int) !$show_guests)),
'L_SWITCH_GUEST_DISPLAY' => ($show_guests) ? phpbb::$user->lang['HIDE_GUESTS'] : phpbb::$user->lang['DISPLAY_GUESTS'],
'S_SWITCH_GUEST_DISPLAY' => (phpbb::$config['load_online_guests']) ? true : false)
);
'S_SWITCH_GUEST_DISPLAY' => (phpbb::$config['load_online_guests']) ? true : false,
));
// We do not need to load the who is online box here. ;)
phpbb::$config['load_online'] = false;
@ -435,9 +435,9 @@ phpbb::$config['load_online'] = false;
// Output the page
page_header(phpbb::$user->lang['WHO_IS_ONLINE']);
$template->set_filenames(array(
'body' => 'viewonline_body.html')
);
phpbb::$template->set_filenames(array(
'body' => 'viewonline_body.html',
));
make_jumpbox(append_sid('viewforum'));
page_footer();

View File

@ -558,7 +558,7 @@ $server_path = (!$view) ? PHPBB_ROOT_PATH : generate_board_url() . '/';
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
// Send vars to template
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'FORUM_ID' => $forum_id,
'FORUM_NAME' => $topic_data['forum_name'],
'FORUM_DESC' => generate_text_for_display($topic_data['forum_desc'], $topic_data['forum_desc_uid'], $topic_data['forum_desc_bitfield'], $topic_data['forum_desc_options']),
@ -632,8 +632,8 @@ $template->assign_vars(array(
'U_POST_NEW_TOPIC' => (phpbb::$acl->acl_get('f_post', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=post&amp;f=$forum_id") : '',
'U_POST_REPLY_TOPIC' => (phpbb::$acl->acl_get('f_reply', $forum_id) || phpbb::$user->is_guest) ? append_sid('posting', "mode=reply&amp;f=$forum_id&amp;t=$topic_id") : '',
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid('posting', "mode=bump&amp;f=$forum_id&amp;t=$topic_id&amp;hash=" . generate_link_hash("topic_$topic_id")) : '')
);
'U_BUMP_TOPIC' => (bump_topic_allowed($forum_id, $topic_data['topic_bumped'], $topic_data['topic_last_post_time'], $topic_data['topic_poster'], $topic_data['topic_last_poster_id'])) ? append_sid('posting', "mode=bump&amp;f=$forum_id&amp;t=$topic_id&amp;hash=" . generate_link_hash("topic_$topic_id")) : '',
));
// Does this topic contain a poll?
if (!empty($topic_data['poll_start']))
@ -822,20 +822,20 @@ if (!empty($topic_data['poll_start']))
$option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
$option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
$template->assign_block_vars('poll_option', array(
phpbb::$template->assign_block_vars('poll_option', array(
'POLL_OPTION_ID' => $poll_option['poll_option_id'],
'POLL_OPTION_CAPTION' => $poll_option['poll_option_text'],
'POLL_OPTION_RESULT' => $poll_option['poll_option_total'],
'POLL_OPTION_PERCENT' => $option_pct_txt,
'POLL_OPTION_PCT' => round($option_pct * 100),
'POLL_OPTION_IMG' => phpbb::$user->img('poll_center', $option_pct_txt, '', round($option_pct * 250)),
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false)
);
'POLL_OPTION_VOTED' => (in_array($poll_option['poll_option_id'], $cur_voted_id)) ? true : false,
));
}
$poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'POLL_QUESTION' => $topic_data['poll_title'],
'TOTAL_VOTES' => $poll_total,
'POLL_LEFT_CAP_IMG' => phpbb::$user->img('poll_left'),
@ -850,8 +850,8 @@ if (!empty($topic_data['poll_start']))
'S_IS_MULTI_CHOICE' => ($topic_data['poll_max_options'] > 1) ? true : false,
'S_POLL_ACTION' => $viewtopic_url,
'U_VIEW_RESULTS' => $viewtopic_url . '&amp;view=viewpoll')
);
'U_VIEW_RESULTS' => $viewtopic_url . '&amp;view=viewpoll',
));
unset($poll_end, $poll_info, $voted_id);
}
@ -1250,9 +1250,9 @@ if ($bbcode_bitfield !== '')
$i_total = sizeof($rowset) - 1;
$prev_post_id = '';
$template->assign_vars(array(
'S_NUM_POSTS' => sizeof($post_list))
);
phpbb::$template->assign_vars(array(
'S_NUM_POSTS' => sizeof($post_list),
));
// Output the posts
$first_unread = $post_unread = false;
@ -1486,13 +1486,13 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
}
// Dump vars into template
$template->assign_block_vars('postrow', $postrow);
phpbb::$template->assign_block_vars('postrow', $postrow);
if (!empty($cp_row['blockrow']))
{
foreach ($cp_row['blockrow'] as $field_data)
{
$template->assign_block_vars('postrow.custom_fields', $field_data);
phpbb::$template->assign_block_vars('postrow.custom_fields', $field_data);
}
}
@ -1501,9 +1501,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
{
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,
));
}
}
@ -1550,13 +1550,13 @@ if ($all_marked_read)
{
if ($post_unread)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_VIEW_UNREAD_POST' => '#unread',
));
}
else if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id])
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_VIEW_UNREAD_POST' => append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
));
}
@ -1568,13 +1568,13 @@ else if (!$all_marked_read)
// What can happen is that we are at the last displayed page. If so, we also display the #unread link based in $post_unread
if ($last_page && $post_unread)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_VIEW_UNREAD_POST' => '#unread',
));
}
else if (!$last_page)
{
$template->assign_vars(array(
phpbb::$template->assign_vars(array(
'U_VIEW_UNREAD_POST' => append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
));
}
@ -1594,9 +1594,9 @@ if (empty(phpbb_request::variable('f', '')))
// Output the page
page_header(phpbb::$user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title']);
$template->set_filenames(array(
'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
);
phpbb::$template->set_filenames(array(
'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html',
));
make_jumpbox(append_sid('viewforum'), $forum_id);
page_footer();