aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php20
-rw-r--r--phpBB/includes/ucp/ucp_profile.php27
2 files changed, 8 insertions, 39 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index e8b8606015..08f911ef64 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -18,6 +18,7 @@ function compose_pm($id, $mode, $action)
global $phpbb_root_path, $phpEx, $config;
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
if (!$action)
@@ -572,7 +573,6 @@ function compose_pm($id, $mode, $action)
// Attachment Preview
if (sizeof($message_parser->attachment_data))
{
- include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$extensions = $update_count = array();
$template->assign_var('S_HAS_ATTACHMENTS', true);
@@ -818,23 +818,7 @@ function compose_pm($id, $mode, $action)
);
// Build custom bbcodes array
- $sql = 'SELECT bbcode_id, bbcode_tag
- FROM ' . BBCODES_TABLE . '
- WHERE display_on_posting = 1';
- $result = $db->sql_query($sql);
-
- $i = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- $template->assign_block_vars('custom_tags', array(
- 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
- 'BBCODE_ID' => 22 + ($i * 2),
- 'BBCODE_TAG' => $row['bbcode_tag'])
- );
-
- $i++;
- }
- $db->sql_freeresult($result);
+ display_custom_bbcodes();
// Attachment entry
if ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype)
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index e7b602b0d1..c529e55223 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -225,7 +225,7 @@ class ucp_profile
'S_CHANGE_EMAIL' => ($auth->acl_get('u_chgemail')) ? true : false,
'S_CHANGE_PASSWORD' => ($auth->acl_get('u_chgpasswd')) ? true : false)
);
- break;
+ break;
case 'profile_info':
@@ -399,7 +399,7 @@ class ucp_profile
$cp->generate_profile_fields('profile', $user->get_iso_lang_id());
- break;
+ break;
case 'signature':
@@ -408,7 +408,8 @@ class ucp_profile
trigger_error('NO_AUTH_SIGNATURE');
}
- include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
+ include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false;
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false;
@@ -486,23 +487,7 @@ class ucp_profile
);
// Build custom bbcodes array
- $sql = 'SELECT bbcode_id, bbcode_tag
- FROM ' . BBCODES_TABLE . '
- WHERE display_on_posting = 1';
- $result = $db->sql_query($sql);
-
- $i = 0;
- while ($row = $db->sql_fetchrow($result))
- {
- $template->assign_block_vars('custom_tags', array(
- 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'",
- 'BBCODE_ID' => 22 + ($i * 2),
- 'BBCODE_TAG' => $row['bbcode_tag'])
- );
-
- $i++;
- }
- $db->sql_freeresult($result);
+ display_custom_bbcodes();
break;
@@ -665,7 +650,7 @@ class ucp_profile
);
}
- break;
+ break;
}
$template->assign_vars(array(